Skip to content

Commit

Permalink
Merge pull request #327 from carpentries/update-docs
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
zkamvar authored Aug 12, 2022
2 parents f15feb3 + 5647a4d commit daf83d5
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 20 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sandpaper
Title: Create and Curate Carpentries Lessons
Version: 0.9.2
Version: 0.9.3
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down Expand Up @@ -68,7 +68,7 @@ LazyData: true
Config/testthat/edition: 3
Config/testthat/parallel: false
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.0
RoxygenNote: 7.2.1
URL: https://carpentries.github.io/sandpaper/, https://github.com/carpentries/sandpaper/, https://carpentries.github.io/workbench/
BugReports: https://github.com/carpentries/sandpaper/issues/
VignetteBuilder: knitr
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# sandpaper 0.9.3

MISC
----

* A test that was failing on the R-universe has been skipped
* documentation has been updated to detail the expected and optional values in
config.yaml in `set_dropdown()`
* The template for the code of conduct has been updated to reflect our style guide

# sandpaper 0.9.2

CONTINUOUS INTEGRATION
Expand Down
48 changes: 48 additions & 0 deletions R/set_dropdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,55 @@ set_dropdown <- function(path = ".", order = NULL, write = FALSE, folder) {
#' single key-pair values currently supported.
#' @inheritParams set_dropdown
#'
#' @details
#'
#' This function deals strictly with keypairs in the yaml. For lists, see
#' [set_dropdown()].
#'
#' ### Default Keypairs Known by Sandpaper
#'
#' When you create a new lesson in sandpaper, there are a set of default
#' keypairs that are pre-filled. To make sure contact information and links in
#' the footer are accurate, please modify these values.
#'
#' - **carpentry** `[character]` one of cp, dc, swc, lab, incubator
#' - **title** `[character]` the lesson title (e.g. `'Introduction to R for
#' Plant Pathologists'`
#' - **created** `[character]` Date in ISO 8601 format (e.g. `'2021-02-09'`)
#' - **keywords** `[character]` comma-separated list (e.g `'static site, R, tidyverse'`)
#' - **life_cycle** `[character]` one of pre-alpha, alpha, beta, stable
#' - **license** `[character]` a license for the lesson (e.g. `'CC-BY 4.0'`)
#' - **source** `[character]` the source repository URL
#' - **branch** `[character]` the default branch (e.g. `'main'`)
#' - **contact** `[character]` an email address of who to contact for more
#' information about the lesson
#'
#' ### Optional Keypairs Known by Sandpaper
#'
#' The following keypairs are known by sandpaper, but are optional:
#'
#' - **url** `[character]` custom URL if you are deploying to a URL that is not
#' the default github pages io domain.
#' - **fail_on_error** `[boolean]` for R Markdown lessons; fail the build if any
#' chunks produce an error. Use `#| error: true` in chunk options to allow the
#' error to be displayed
#' - **workbench-beta** yes `[boolean]` if truthy, this displays a banner on the
#' site that indicates the site is in the workbench beta phase.
#'
#' As the workbench becomes more developed, some of these optional keys may
#' disappear.
#'
#' @export
#' @examples
#' if (FALSE) {
#' tmp <- tempfile()
#' create_lesson(tmp, "test lesson")
#' # Change the title and License
#' set_config(c(title = "Absolutely Free Lesson", license = "CC0"),
#' path = tmp,
#' write = TRUE
#' )
#' }
set_config <- function(pairs = NULL, create = FALSE, path = ".", write = FALSE) {
keys <- names(pairs)
values <- pairs
Expand Down
50 changes: 50 additions & 0 deletions man/set_config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 10 additions & 18 deletions man/yaml_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit daf83d5

Please sign in to comment.