Skip to content

Commit

Permalink
update template default values to include fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar committed Mar 16, 2023
1 parent 68bcd2a commit dcc2b64
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
13 changes: 9 additions & 4 deletions R/create_lesson.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ create_lesson <- function(path, name = fs::path_file(path), rmd = TRUE, rstudio
copy_template("setup", fs::path(path, "learners"), "setup.md")
copy_template("index", path, "index.md")
copy_template("links", path, "links.md")
copy_template("placeholder", fs::path(path, "instructors"), "instructor-notes.md")
copy_template("placeholder", fs::path(path, "profiles"), "learner-profiles.md")
copy_template("placeholder", fs::path(path, "learners"), "reference.md",
values = c(title = "Glossary"))
copy_template("placeholder", fs::path(path, "instructors"),
name = "instructor-notes.md",
values = list(title = "Instructor Notes", heading = NULL))
copy_template("placeholder", fs::path(path, "profiles"),
name = "learner-profiles.md",
values = list(title = NULL, heading = NULL))
copy_template("placeholder", fs::path(path, "learners"),
name = "reference.md",
values = c(title = "Reference", heading = "Glossary"))

cli::cli_status_update("{cli::symbol$arrow_right} Generating {.file config.yaml} ...")
account <- tryCatch(gh::gh_whoami()$login, error = function(e) "carpentries")
Expand Down
8 changes: 4 additions & 4 deletions inst/templates/config-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ carpentry: {{ carpentry }}
title: {{ title }}

# Date the lesson was created (YYYY-MM-DD, this is empty by default)
created: ~
created: {{ created }}{{ ^created }}~ # FIXME {{ /created }}

# Comma-separated list of keywords for the lesson
keywords: {{keywords}}{{^keywords}}software, data, lesson, The Carpentries{{/keywords}}
keywords: {{keywords}}{{^keywords}}software, data, lesson, The Carpentries # FIXME{{/keywords}}

# Life cycle stage of the lesson
# possible values: pre-alpha, alpha, beta, stable
life_cycle: {{ life_cycle }}

# License of the lesson
# License of the lesson materials (recommended CC-BY 4.0)
license: {{ license }}

# Link to the source repository for this lesson
source: {{ source }}{{ ^source }}https://example.com/template-source{{ /source }}
source: {{ source }}{{ ^source }}https://example.com/FIXME-template-source{{ /source }}

# Default branch of your lesson
branch: {{ branch }}{{ ^branch }}main{{ /branch }}
Expand Down
8 changes: 4 additions & 4 deletions inst/templates/placeholder-template.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: FIXME
title: {{title}}{{^title}}FIXME{{/title}}
---

{{#title}}
## {{title}}
{{#heading}}
## {{heading}}

{{/title}}
{{/heading}}
This is a placeholder file. Please add content here.

0 comments on commit dcc2b64

Please sign in to comment.