Skip to main content

Navigation

Discoverable navigation for the complete documentation journey.

On this page

Use typed destinations for pages and destination-free groups; the shell derives side navigation and breadcrumbs while sections supply the local table of contents.

Navigation, breadcrumbs, and table of contents
let navigation = [
    docsNavPage "overview" "Overview" "/" "/"
    docsNavGroup "guides" "Guides" true [
        docsNavPage "install" "Installation" "/installation" "/installation" ] ]

let navigationSite = { exampleSite with navigation = navigation }
let navigationPreview = docsSideNav navigationSite (docsArticle "install" "Installation" "Install the package." [])

Previous and next

Add an explicit learning path when the ideal reading order differs from the complete sidebar order.

Previous and next
let pagerPage =
    docsArticle "usage" "Usage" "Compose typed HTML." []
    |> docsWithPager (
        docsPager
            (Some(docsPageLink "Installation" "/installation"))
            (Some(docsPageLink "Extensions" "/extensions")))

Theme and repository actions

Configure System, Light, or Dark as the default and optionally expose a GitHub or custom repository destination.

Theme and repository actions
let siteWithActions =
    { exampleSite with
        defaultColorMode = DocsColorMode.System
        repository = Some(DocsRepository.github "https://github.com/example/project") }

let actionsHtml =
    docsDocument siteWithActions pagerPage
    |> Render.toHtmlDocString