docs

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package docs embeds the moth documentation and serves it, rendered to self-contained HTML, at /docs inside the binary. The markdown is single-sourced from the public website (website/src/content/docs) by website/scripts/sync-embedded-docs.mjs (`make docs-embed`); the committed content/ tree is what go:embed ships, so the embedded docs always match the binary's own release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler serves the embedded docs. Mount it at /docs (the caller strips the /docs prefix so this handler sees the slug directly). Unknown slugs 404.

func Slugs

func Slugs() []string

Slugs returns every rendered page slug (for tests and sanity checks).

Types

type NavEntry struct {
	Slug  string // path under /docs (empty = the index)
	Title string
	Group string // non-empty marks a section header row
}

NavEntry is one item in the docs sidebar. A Group with no Slug is a section heading rendered above its following pages.

Jump to

Keyboard shortcuts

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