Skip to contents

Lesson Creation

Provision new lessons and/or episodes. These functions will likely only be used once.

Building Lessons

Functions to work build, audit, and preview lesson content. These will be used with regularity in your work.

Build your lesson and work on it at the same time
Build your lesson site
Site generator for sandpaper
Pre-build validation of lesson elements

Lesson Development Helpers

Functions to programmatically assess and modify configuration and source elements of a lesson. These are often used when developing a lesson.

Show files in draft form
Get the configuration parameters for the lesson
Set individual keys in a configuration file
set_dropdown() set_episodes() set_learners() set_instructors() set_profiles()
Set the order of items in a dropdown menu
get_dropdown() get_episodes() get_learners() get_instructors() get_profiles()
Helpers to extract contents of dropdown menus on the site
Move an episode in the schedule
Create a syllabus for the lesson
Clear the schedule in the lesson
Remove all files associated with the site
This will strip existing episode prefixes and set the schedule

The Package Cache

Lessons with generated content (R Markdown lessons) have an extra file called renv/profiles/lesson-requirments/renv.lock that records the package versions used to build the lesson. These functions provide ways for you to manage these packages and turn it on or off while previewing the lesson.

use_package_cache() no_package_cache() package_cache_trigger()
Give Consent to Use Package Cache
manage_deps() update_cache() pin_version()
Lesson Runtime Dependency Management

Updating Lesson Tools

Lesson updates will happen automatically on a regular schedule on GitHub. If you want to expediate those updates or update the components on your own computer, these functions will help you with that.

Update the local version of the carpentries style
manage_deps() update_cache() pin_version()
Lesson Runtime Dependency Management
Update github workflows

[Internal] Continous Integration Functions

Internal functions for deploying on continuous integration. Users are not intended to work with these.

(INTERNAL) Build and deploy the site with continous integration
ci_build_markdown() ci_build_site()
Build and deploy individual site components to a remote branch
Report session information to the user
git_worktree_setup() github_worktree_commit() github_worktree_remove()
Setup a git worktree for concurrent manipulation of a separate branch

[Internal] Markdown Build Components

Internal functions used to provision and build the markdown components of a lesson.

this_lesson() clear_this_lesson() set_this_lesson() set_resource_list() clear_resource_list()
Internal cache for storing pre-computed lesson objects
Create a code handout of challenges without solutions
Build plain markdown from the RMarkdown episodes
Build an episode to markdown
Global Options

[Internal] HTML Build Components

Internal functions used to provision and build the HTML components of a lesson assuming that the markdown components have been built. (this is non-exhaustive)

Show a list of languages known by sandpaper
these establish_translation_vars() set_language() tr_src() tr_get() tr_varnish() tr_computed()
Establish and Manage Translation Strings
Render html from a markdown file
Wrapper for site builder
Build a single episode html file
Build a home page for a lesson
Build the 404 page for a lesson
Build instructor and learner HTML page
create_resources_dropdown() create_sidebar() update_sidebar()
Create the sidebar for varnish
create_sidebar_item() create_sidebar_headings()
Create a single item that appears in the sidebar

[Internal] Post-build Aggregation Components

Components to build aggregate pages such as All in One and Keypoints

read all HTML files in a folder
provision_agg_page() provision_extra_template()
Provision an aggregate page in a lesson
Get sections from an episode's HTML page
Make a section and place it inside the All In One page
Make a section of aggregated images
build_aio() build_images() build_instructor_notes() build_keypoints() build_agg_page()
Build a page for aggregating common elements

[Internal] Resource Discovery/Management

Tools for discovering resources and managing their hashes in a text file database.

Get the full resource list of markdown files
Subset file matches to the order they appear in the config file
get_hash() get_built_db() build_status()
Identify what files need to be rebuilt and what need to be removed
hash_children() get_lineages()
Update file checksums to account for child documents
template_gitignore() template_episode() template_links() template_config() template_conduct() template_index() template_license() template_contributing() template_setup() template_pkgdown() template_placeholder() template_pr_diff() template_sidebar_item() template_metadata()
Template files
Create a valid, opinionated yaml list for insertion into a whisker template

[Developer] Lesson Test Fixture

Internal documentation for the temporary lesson and remote used as a test fixture created and destroyed before and after tests.