Skip to content

Commit

Permalink
Document function and change title of 'New Project Wizard' to "Quarto…
Browse files Browse the repository at this point in the history
…-Based OTTR Course"
  • Loading branch information
howardbaik committed May 13, 2024
1 parent 2d497cf commit 67fcebd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions R/setup_project.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
setup_project <- function(path, ...) {
#' Template Function to Initiate a New Quarto-Based OTTR Course
#'
#' This function will be invoked by RStudio to create a new RStudio Project
#' containing boilerplates files required to start a new Quarto-based OTTR course.
#'
#' For more details, refer to the RStudio Project Templates link:
#' https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html
#'
#' @param path Path to newly created project
#' @param ... User inputs
#' @noRd
setup_project_quarto <- function(path, ...) {
# collect inputs
dots <- list(...)

Expand Down Expand Up @@ -49,7 +60,7 @@ setup_project <- function(path, ...) {
lapply(boilerplate_file_gha, copy_files, dots$style_set, path)
}

# Function to copy each file
# Utility function to copy each file
copy_files <- function(file_name, style_set, project_path) {
if (style_set == "FHDaSL") {
style_set <- "fhdasl"
Expand Down
4 changes: 2 additions & 2 deletions inst/rstudio/templates/project/rstudio_project_template.dcf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Binding: setup_project
Title: OTTR Course
Binding: setup_project_quarto
Title: Quarto-Based OTTR Course
Icon: logo.png

Parameter: style_set
Expand Down

0 comments on commit 67fcebd

Please sign in to comment.