mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
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
24 lines
626 B
Go
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")
|
|
}
|
|
}
|