Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Site Site `json:"site"`
SourceDir string `json:"sourceDir"` // Markdown root, relative to the config file. Default ".".
Output string `json:"output"` // Output file, relative to the config file. Default "index.html".
Home string `json:"home"` // Optional home content: a ".md" file path (relative to SourceDir) or inline Markdown.
CustomCSS string `json:"customCSS"` // Optional CSS file inlined after the defaults, relative to the config file.
Groups []Group `json:"groups"`
}
Config is the whole site description, loaded from a JSON file.
type Group ¶
type Group struct {
Title string `json:"title"`
HideCards bool `json:"hideCards"` // Omit this group from the home card grid.
Items []Item `json:"items"`
}
Group is a titled cluster of sidebar items.
type Item ¶
type Item struct {
Title string `json:"title"`
Source string `json:"source"` // Markdown file, relative to SourceDir.
Section string `json:"section"` // Extract just this "## <section>" block from Source.
Anchor string `json:"anchor"` // In-page section id this doc renders under.
Href string `json:"href"` // Explicit link target; used when Anchor is empty.
Blurb string `json:"blurb"` // Card description on the home view.
Children []Item `json:"children"` // Nested sidebar entries.
}
Item is a single sidebar entry. A doc entry sets Source (+ optional Section) and Anchor; a plain link sets Href instead; a branch sets neither and nests Children. Any item may also carry Children to build a multi-level sidebar.
Click to show internal directories.
Click to hide internal directories.