pub fn page(
title: &str,
home: &str,
breadcrumb: &str,
repo: Option<&str>,
body: &str,
) -> StringExpand description
The site shell: one stylesheet, inline, no fonts and no scripts.
The whole generated site is static files that open from file:// as readily as from a server,
which is what keeps the documentation reviewable in a pull request and buildable offline.
docs/07-dependencies.md lists mdBook for the eventual
book; a reference page needs less than a book does, and less is one fewer dependency.
home is the href of the site index relative to this page. It is a parameter rather than a
constant because a module page is written one directory down from the reference pages, and a
header link that 404s from half the site is worse than no header link.
repo is the repository the site is generated from, and every page carries it: a published page
is derived from a program, and a reader who wants the program should not have to guess where it
lives. It is a parameter rather than a constant because the compiler does not know what
repository it was built in — .github/workflows/docs.yml passes GitHub’s own
${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}, so a fork’s site links to the fork. None renders
no link, which is what a local beck doc run wants.