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.

serve()
Build your lesson and work on it at the same time
build_lesson()
Build your lesson site
sandpaper_site()
Site generator for sandpaper
validate_lesson()
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.

get_drafts()
Show files in draft form
get_config()
Get the configuration parameters for the lesson
set_config()
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_episode()
Move an episode in the schedule
get_syllabus()
Create a syllabus for the lesson
reset_episodes()
Clear the schedule in the lesson
reset_site()
Remove all files associated with the site
strip_prefix()
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_varnish()
Update the local version of the carpentries style
manage_deps() update_cache() pin_version()
Lesson Runtime Dependency Management
update_github_workflows()
Update github workflows

[Internal] Continous Integration Functions

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

ci_deploy()
(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
ci_session_info()
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
build_handout()
Create a code handout of challenges without solutions
build_markdown()
Build plain markdown from the RMarkdown episodes
build_episode_md()
Build an episode to markdown
sandpaper.options
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)

render_html()
Render html from a markdown file
build_site()
Wrapper for site builder
build_episode_html()
Build a single episode html file
build_home()
Build a home page for a lesson
build_404()
Build the 404 page for a lesson
build_html()
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()
read all HTML files in a folder
provision_agg_page() provision_extra_template()
Provision an aggregate page in a lesson
get_content()
Get sections from an episode's HTML page
make_aio_section()
Make a section and place it inside the All In One page
make_images_section()
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_resource_list()
Get the full resource list of markdown files
parse_file_matches()
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
yaml_list()
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.