pub struct PageContext<'a> {
pub site_title: &'a str,
pub nav: &'a SiteNavigation,
pub seo_meta: &'a str,
pub feed_links: &'a str,
pub lang: &'a str,
pub template: Option<&'a ShellTemplate>,
pub site_header: &'a str,
pub site_footer: &'a str,
}Expand description
Everything about the site that wrapping one page in its shell needs.
A struct rather than seven positional arguments because the shell grew slots
— a template, a language, per-page assets — and a call site that reads
(page, title, false, &nav, &seo, &feeds) is one whose next argument goes in
the wrong place.
Fields§
§site_title: &'a strThe site’s name, for <title> and the {{site_title}} slot.
This page’s nav tree and breadcrumb trail.
seo_meta: &'a strPre-rendered SEO <meta> tags, or empty.
feed_links: &'a strPre-rendered feed <link> tags, or empty.
lang: &'a strBCP 47 language tag for <html lang="…">.
template: Option<&'a ShellTemplate>The caller’s shell, or None for the built-in one. Ignored by a page
whose layout is PageLayout::Bare.
site_header: &'a strThe site’s header document, already rendered for this page — the
site_header slot. Empty when the site declares none.
The site’s footer document, on the same terms — the site_footer
slot.