DocPage
type DocPage =
{
Title: string
Description: string option
Image: PageImage
ShowToc: bool
ShowPageNav: bool
ShowMenu: bool
MenuFilter: bool option
MenuMemory: bool
ShowTitle: bool
ShowEditLink: bool
Styled: bool
MainAttributes: (string * string) list
Layout: string
}| Assembly | Nacara.Theme.Docs |
What the theme needs to know about the page it is rendering.
Kept separate from the front-matter type so a site can define its own front matter and still use the theme: it maps its type onto this record, and nothing else changes.
Fields
Image: PageImage
Image: PageImageThe image a link to the page is shown with on social sites.
Styled: bool
Styled: boolWhether the theme lays the content out.
Off, the page is a canvas: its title, the prose styles and the edit link are left out, and the content is placed as it was written.
MainAttributes: (string * string) list
MainAttributes: (string * string) listAttributes to put on the page's <main>, name and value.
id, class and tabindex are the theme's own and cannot be set here.
Layout: string
Layout: stringWhich of the theme's layouts draws the page.
doc is the ordinary one. bare and splash are what bare and splash set; a theme may know others.
Functions and values
create (title: string) : DocPage
create (title: string) : DocPageA page shown with everything the theme offers.
| Parameter | |
|---|---|
title | Its heading, its entry in the menu, and its <title>. |
image (image: SocialImage) (page: DocPage) : DocPage
image (image: SocialImage) (page: DocPage) : DocPageThe image a link to the page is shown with on social sites.
| Parameter | |
|---|---|
image | The image. |
page | The page being described. |