feat(11.1-04): add the Backend section, the remaining Services pages and the concept map links

- docs/backend: admin controllers, forms, lists and filters, relation
  manager, users and permissions, settings, partials and widgets, admin SPA
- docs/services: storage, outbound HTTP, realtime, Web Push, search, parity
  testing and the Frontend and AJAX (not provided) page
- Examples for cabana (with testdata/docs YAML), fetchguard, lighthouse and
  its centrifugo driver, flare, beachcomber and typesense, tide; lighthouse
  and beachcomber TestDocs* regions run on their Postgres harnesses
- concept map rows link their guide pages and the not-provided rows the
  Frontend and AJAX page; index lists Backend, Database and Services
- TestDocsRequiredPages asserts the D-08 section order
This commit is contained in:
Jakub Zych
2026-09-30 23:18:35 +02:00
parent f7dfe68707
commit 44bd1446f5
40 changed files with 2882 additions and 30 deletions

View File

@@ -109,11 +109,43 @@ var requiredPages = []string{
"services/oauth-server",
"services/mail",
"services/localization",
"backend/admin-controllers",
"backend/forms",
"backend/lists-and-filters",
"backend/relation-manager",
"backend/users-and-permissions",
"backend/settings",
"backend/partials-and-widgets",
"backend/admin-spa",
"services/storage",
"services/outbound-http",
"services/realtime",
"services/push",
"services/search",
"services/parity-testing",
"services/frontend-and-ajax",
}
// sectionOrder is the D-08 sidebar order: WinterCMS's documentation order,
// with the API reference last.
var sectionOrder = []string{"setup", "architecture", "plugins", "backend", "database", "services", "console", "api"}
// TestDocsRequiredPages asserts that every required page is in the loaded
// tree and is built as both .html and .md on the real tree.
// tree and is built as both .html and .md on the real tree, and that
// site.yaml lists the sections in sectionOrder.
func TestDocsRequiredPages(t *testing.T) {
raw, err := os.ReadFile(filepath.Join(repoRoot, "docs", "site.yaml"))
if err != nil {
t.Fatal(err)
}
var sections []string
for _, m := range regexp.MustCompile(`(?m)^ - name: (\S+)$`).FindAllStringSubmatch(string(raw), -1) {
sections = append(sections, m[1])
}
if !slices.Equal(sections, sectionOrder) {
t.Errorf("site.yaml sections = %v, want %v", sections, sectionOrder)
}
pages, problems, err := docsite.Pages(docsite.Options{Root: repoRoot, Commands: docsCommands()})
if err != nil || len(problems) > 0 {
t.Fatalf("Pages: %v %v", err, problems)