feat(11.1-03): add the Coming from WinterCMS concept map with a verified plugin example
- docs/setup/coming-from-wintercms.md maps WinterCMS concepts to checked pkg.Ident spans and lists what SummerCMS does not provide - party BlogPlugin and ExamplePlugin, shown through src= fences - TestDocsRequiredPages asserts required pages build as .html and .md - index links the new page
This commit is contained in:
@@ -72,6 +72,38 @@ func TestDocsBuildRealTree(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// requiredPages lists the guide pages the docs must keep. Each content plan
|
||||
// appends the pages it writes.
|
||||
var requiredPages = []string{
|
||||
"index",
|
||||
"setup/installation",
|
||||
"setup/coming-from-wintercms",
|
||||
}
|
||||
|
||||
// TestDocsRequiredPages asserts that every required page is in the loaded
|
||||
// tree and is built as both .html and .md on the real tree.
|
||||
func TestDocsRequiredPages(t *testing.T) {
|
||||
pages, problems, err := docsite.Pages(docsite.Options{Root: repoRoot, Commands: docsCommands()})
|
||||
if err != nil || len(problems) > 0 {
|
||||
t.Fatalf("Pages: %v %v", err, problems)
|
||||
}
|
||||
loaded := map[string]bool{}
|
||||
for _, p := range pages {
|
||||
loaded[p.URL] = true
|
||||
}
|
||||
out, _ := buildRealTree(t)
|
||||
for _, url := range requiredPages {
|
||||
if !loaded[url] {
|
||||
t.Errorf("page %s is not in the docs tree", url)
|
||||
}
|
||||
for _, ext := range []string{".html", ".md"} {
|
||||
if _, err := os.Stat(filepath.Join(out, filepath.FromSlash(url)+ext)); err != nil {
|
||||
t.Errorf("page %s has no %s output: %v", url, ext, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// frameworkModules lists modules/<m> directories that hold a non-test Go
|
||||
// file, discovered independently of docsite.
|
||||
func frameworkModules(t *testing.T) []string {
|
||||
|
||||
Reference in New Issue
Block a user