site

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) http.Handler

Types

type Page

type Page struct {
	Path     string
	Title    string
	Summary  string
	Template string
	Keywords []string

	// Eyebrow, Lede, and Body come from the docs markdown content and are
	// empty for hand-written template pages.
	Eyebrow string
	Lede    string
	Body    template.HTML
	// Corpus is the lowercase search text: title, summary/lede, keywords,
	// and the raw markdown body. Built once at startup.
	Corpus string
}

Page describes a renderable page in the Perk Workbench site.

func LoadPages

func LoadPages() []Page

LoadPages merges the static catalogue with the rendered docs markdown. Every markdown document becomes a page in frontmatter order after /docs; documents take their title, lede, keywords, and body from the frontmatter and rendered body. The static catalogue only fixes the routes that must never be markdown-backed.

func PageCatalogue

func PageCatalogue() []Page

PageCatalogue returns the hand-written pages in navigation order. The documentation routes are markdown-backed and appended by LoadPages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL