Varnish uses a sidebar for navigation across and within an episode. Each episode's sidebar is different because there needs to be a clear indicator which episode is the current one within the sidebar.
Usage
create_resources_dropdown(files, type = "learners")
create_sidebar(
chapters,
name = "",
html = "<a href='https://carpentries.org'/>"
)
update_sidebar(
sidebar = NULL,
nodes = NULL,
this_page = NULL,
title = NULL,
item = NULL
)
Arguments
- files
a vector of markdown file names
- type
one of "learners" (default) or "instructors". If it is learners, the setup page will be excluded since it is included in the index. For "instructors", the instructor notes are included and the learner profiles are included.
- chapters
a character vector of paths to markdown chapters
- name
the name of the current chapter
- html
the html of the current chapter. defaults to a link that will produce a sidebar with no links to headings.
an object of class "list-store" which has a
"sidebar"
element in the stored list. Seeset_globals()
.- nodes
the HTML nodes of an HTML page
- this_page
the path to the current HTML page
- title
the current title
- item
the index of the sidebar item to update
See also
create_sidebar_item()
for creation of individual sidebar items,
set_globals()
for where create_sidebar()
is called and
build_html()
for where update_sidebar()
is called.