pub struct ShellSlots {Show 15 fields
pub lang: String,
pub document_title: String,
pub site_title: String,
pub body_class: String,
pub root_prefix: String,
pub head: String,
pub site_nav: String,
pub breadcrumbs: String,
pub toc: String,
pub site_header: String,
pub content: String,
pub pager: String,
pub site_footer: String,
pub footer: String,
pub scripts: String,
}Expand description
The named values a shell template is filled with.
Text fields hold their unescaped text; escaping happens where the slot is filled, so a value is escaped exactly once no matter which shell renders it.
Fields§
§lang: String{{lang}} — the document language, for <html lang="…">.
document_title: String{{document_title}} — the <title> text: "Entry - Site", or just the
site’s name on the page that is the site.
site_title: String{{site_title}} — the site’s name on its own.
body_class: String{{body_class}} — the class list for <body>, to be written inside
class="…". Empty when the page has no site nav.
root_prefix: String{{root_prefix}} — the path from this page back up to the site root:
../ per level of depth, empty at the root. Every prefixed href in
head and site_nav was computed from it; a template writing its own
<a href="{{root_prefix}}index.html"> or <img src="{{root_prefix}}logo.svg">
needs the same value.
head: String{{{head}}} — stylesheet link, favicon link, SEO meta, feed links and
the page’s own styles:, as a newline-separated run of tags indented
four spaces. Does not include <title>, which is its own slot.
{{{site_nav}}} — the site navigation: the mobile bar with its menu
button, then the sidebar with the masthead and the tree. Empty when
the site has no nav tree.
{{{breadcrumbs}}} — the breadcrumb trail for this page.
toc: String{{{toc}}} — the page’s outline, a <nav class="toc"> of its h2–h3
headings. Empty when there are fewer than two, or the page said
toc: false.
site_header: String{{{site_header}}} — the site’s header document, rendered for this
page. Empty when the site declares none.
content: String{{{content}}} — the rendered body, with its links already rewritten.
pager: String{{{pager}}} — <nav class="pager"> linking the previous and next
page in the nav’s reading order. Empty for a page the nav does not
hold, or a site of one page.
{{{site_footer}}} — the site’s footer document, rendered for this
page. Empty when the site declares none.
{{{footer}}} — the built-in attribution footer.
scripts: String{{{scripts}}} — the built-in interactivity script and the page’s own
scripts:, as a newline-separated run of tags indented four spaces.
Trait Implementations§
Source§impl Clone for ShellSlots
impl Clone for ShellSlots
Source§fn clone(&self) -> ShellSlots
fn clone(&self) -> ShellSlots
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more