Logo FSharp.Formatting

Menu Module

Internal helpers for building navigation menu HTML from template files

Types

Type Description

MenuItem

A single navigation menu item with its link, display text, hover text and active state

Functions and values

Function or value Description

createMenu input substitutions isCategoryActive header items

Full Usage: createMenu input substitutions isCategoryActive header items

Parameters:
Returns: string

Renders an HTML navigation menu for the given header and items using template files in `input`. `substitutions` are the ones the page itself is rendered with, `{{root}}` among them, so a menu template can reach the rest of the site and not only the links it is handed. They go in first, so a menu template cannot lose its own keys to a project that happens to define one of them.

input : string
substitutions : Substitutions
isCategoryActive : bool
header : string
items : MenuItem list
Returns: string

getLastWriteTimes input

Full Usage: getLastWriteTimes input

Parameters:
Returns: DateTime list

Returns the last-write timestamps of the two menu template files

input : string
Returns: DateTime list

isTemplatingAvailable input

Full Usage: isTemplatingAvailable input

Parameters:
Returns: bool

Returns true when both required menu template files exist in `input`

input : string
Returns: bool

Type something to start searching.