docs

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package docs embeds operator-facing Markdown from docs/user/ so the running factum2-web binary can serve the same pages as GitHub Pages. Install and design notes stay on disk for the public site / git; they are not embedded. A -tags release build overlays docs/generated/sbom.md onto the sbom page when that file was produced by `make sbom`.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSlug is returned when a requested slug is not a lowercase
	// hyphenated name (so path traversal never reaches ReadFile).
	ErrInvalidSlug = errors.New("invalid slug")
	// ErrNotFound is returned when no user doc matches a valid slug.
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Page

type Page struct {
	Slug     string `json:"slug"`
	Title    string `json:"title"`
	Order    int    `json:"-"`
	Markdown string `json:"markdown,omitempty"`
}

Page is one operator doc. List omits Markdown; Get includes it.

func Get

func Get(slug string) (Page, error)

Get returns one user doc by slug, including Markdown with front matter stripped.

func List

func List() ([]Page, error)

List returns every docs/user/*.md page, ordered by front-matter `order` then title, without Markdown bodies.

Jump to

Keyboard shortcuts

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