build_lesson: Build your lesson site

View source: R/build_lesson.R

build_lessonR Documentation

Build your lesson site

Description

This function orchestrates rendering generated lesson content and applying the theme for the HTML site.

Usage

build_lesson(
  path = ".",
  rebuild = FALSE,
  quiet = !interactive(),
  preview = TRUE,
  override = list()
)

Arguments

path

the path to your repository (defaults to your current working directory)

rebuild

if TRUE, everything will be built from scratch as if there was no cache. Defaults to FALSE, which will only build markdown files that haven't been built before.

quiet

when TRUE, output is supressed

preview

if TRUE, the rendered website is opened in a new window

override

options to override (e.g. building to alternative paths). This is used internally and will likely be changed.

Details

Structure of a Workbench Lesson

A Carpentries Workbench lesson is comprised of a set of markdown files and folders:

+-- config.yaml
+-- index.md
+-- episodes
|   +-- data
|   +-- fig
|   +-- files
|   \-- introduction.Rmd
+-- instructors
|   \-- instructor-notes.md
+-- learners
|   \-- setup.md
+-- profiles
|   \-- learner-profiles.md
+-- links.md
+-- site
    \-- [...]
+-- renv
|   \-- [...]
+-- CODE_OF_CONDUCT.md
+-- CONTRIBUTING.md
+-- LICENSE.md
\-- README.md

Value

TRUE if it was successful, a character vector of issues if it was unsuccessful.

See Also

serve(): an interactive way to build and edit lesson content.

Examples



tmp <- tempfile()
create_lesson(tmp, open = FALSE, rmd = FALSE)
create_episode("first-script", path = tmp, open = FALSE)
check_lesson(tmp)
build_lesson(tmp)


zkamvar/sandpaper documentation built on April 15, 2024, 5:32 p.m.