Skip to content

ThemeOptions

type ThemeOptions =
    {
        Navbar: NavbarItem list
        NavbarEnd: NavbarItem list
        Menus: Map<string,MenuItem list>
        EditUrlBase: string option
        HeadExtra: ReactElement list
        Css: string list
        Footer: ReactElement option
        FavIcon: string option
        MenuLimit: int
        MenuGroupLimit: int
    }
AssemblyNacara.Theme.Default

Options of the default theme.

Fields

Navbar: NavbarItem list
NavbarEnd: NavbarItem list
Menus: Map<string,MenuItem list>

Explicit menus, keyed by the first segment of a page's route. Sections with no entry here get a menu built from their pages.

EditUrlBase: string option

Base URL for "edit this page" links, for example https://github.com/MangelMaxime/Nacara/edit/main/.

HeadExtra: ReactElement list

Extra markup injected at the end of <head>.

Css: string list

CSS added to every page, after the theme's own.

For a rule or two. A stylesheet of your own belongs in a file, shipped as a static asset and linked from HeadExtra.

Footer: ReactElement option
FavIcon: string option

Path of the favicon, relative to the site root.

MenuLimit: int

How many pages a section's menu writes into a page before it prunes.

Under it the menu is written whole, so the filter box covers every page it holds. 0 never prunes, whatever it costs.

MenuGroupLimit: int

Which groups are pruned, once a menu is over MenuLimit.

A group of more than this keeps the trail to the page being read and a link to its own page; a smaller one is written whole.