Files
bbs/internal/confedit/reference_test.go
T
Claude 1ea5fb8280 Site: docs/wiki as d-modem.github.io/bbs, with a configuration reference
docs/wiki/Configuration-Reference.md lists every section and key of
bbs.conf with its help, default, examples and whether it is live: the
configuration editor's catalog of bbs.conf.sample, written by
go generate ./internal/confedit (confedit.Reference). A test, and the
Pages build, fail when the committed page isn't the one the sample
makes. The sidebar and Configuration link it.

mkdocs.yml builds the wiki's pages into the site with brand's shared
theme (Zensical); page.html URLs keep the wiki's links (Configuration,
SSH#keys) working, as GitHub Pages serves page.html for /page. Home is
the home page. .github/workflows/pages.yml calls brand's site workflow:
a pull request builds it, main deploys it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-06 01:22:32 +00:00

24 lines
626 B
Go

package confedit
import (
"bytes"
"os"
"testing"
bbssec "github.com/D-Modem/bbs"
)
//go:generate go run ./refdoc ../../docs/wiki/Configuration-Reference.md
// TestReferenceUpToDate: the committed reference page is the one the
// sample makes now (go generate ./internal/confedit if not).
func TestReferenceUpToDate(t *testing.T) {
have, err := os.ReadFile("../../docs/wiki/Configuration-Reference.md")
if err != nil {
t.Fatal(err)
}
if want := Reference(NewCatalog(bbssec.Sample)); !bytes.Equal(have, want) {
t.Error("docs/wiki/Configuration-Reference.md is out of date: go generate ./internal/confedit")
}
}