Skip to content

Commit

Permalink
accept doi field in lesson config
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyhodges committed Oct 30, 2023
1 parent a587d5d commit ffa71fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 7 additions & 5 deletions R/utils-yaml.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,13 @@ create_pkgdown_yaml <- function(path) {
dc = usr$carpentry == 'dc',
swc = usr$carpentry == 'swc',
# Should we display a lifecycle banner?
life_cycle = if (usr$life_cycle == "stable") "~" else siQuote(usr$life_cycle),
pre_alpha = if (usr$life_cycle == "pre-alpha") TRUE else "~",
alpha = if (usr$life_cycle == "alpha") TRUE else "~",
beta = if (usr$life_cycle == "beta") TRUE else "~",
life_cycle = siQuote(usr$life_cycle),
pre_alpha = usr$life_cycle == "pre-alpha",
alpha = usr$life_cycle == "alpha",
beta = usr$life_cycle == "beta",
stable = usr$life_cycle == "stable",
# Should we display DOI info?
doi = siQuote(usr$doi),
NULL
)
)
Expand Down Expand Up @@ -236,4 +239,3 @@ quote_config_items <- function(yaml) {
}
yaml
}

6 changes: 4 additions & 2 deletions inst/templates/pkgdown-yaml-template.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------ information
# ------------------------------------------------------------------ information
# This file was generated by sandpaper version {{ version }}
# If you want to make changes, please edit {{ config }}
# ------------------------------------------------------------------ information
# ------------------------------------------------------------------ information
title: {{ title }} # needed to set the site title
home:
title: Home
Expand All @@ -27,3 +27,5 @@ template:
pre_alpha: {{ pre_alpha }}
alpha: {{ alpha }}
beta: {{ beta }}
stable: {{ stable }}
doi: {{ doi }}

0 comments on commit ffa71fb

Please sign in to comment.