DocFrontMatter
type DocFrontMatter =
{
Title: string
Description: string option
Order: int option
Layout: string option
PageNav: bool option
MenuFilter: bool option
MenuMemory: bool option
Toc: TocSetting option
Main: (string * string) list
}| Assembly | Nacara.Theme.Default |
Front matter understood by the theme's ready-made collection.
The shape of every page's --- block. A site wanting fields of its own declares its own record and its own decoder; this one is what Theme.docs reads, and the only required field is the title.
Fields
Description: string option
Description: string optionOne sentence about the page, for search results and the page's meta description.
Order: int option
Order: int optionWhere the page sits among the pages of its section.
Read only when the section has no menu declared - a menu says the order outright, and then this says nothing. Pages without one come last, in title order.
Layout: string option
Layout: string optionWhich layout renders the page, when it is not the ordinary one.
layout: bare is a page with no chrome: no menu, no table of contents, no previous and next links. A landing page is the usual reason.
Toc: TocSetting option
Toc: TocSetting optionThe table of contents: toc: false for none, or the heading levels it holds.
toc:
from: 2
to: 2
A page whose sections are uninteresting on their own - a changelog, where the versions are what a reader navigates by - says so here. Left out, the markdown plugin's option decides for the whole site. Either bound may be left out: from is 2, a page's own title being the only heading above it, and to is 6.
Main: (string * string) list
Main: (string * string) listAttributes to put on the page's <main>:
main:
data-pagefind-weight: "0.3"
id, class and tabindex are the theme's own and cannot be set here.
Functions and values
decoder: Decoder<DocFrontMatter>
decoder: Decoder<DocFrontMatter>Reads the theme's front matter, failing the build with file and line when it cannot.
toDocPage (frontMatter: DocFrontMatter) : DocPage
toDocPage (frontMatter: DocFrontMatter) : DocPageThe theme's view of a page described by this front matter.