Make Web an executable handbook with recursive Markdown layouts

This commit is contained in:
cflmy committed 2026-11-08 21:50:01 +08:00
1 parent cc5277d2b5
commit 5080136d65
84 files changed
+3394 -957

No files matched your search

+6 -1
View File
@@ -1272,7 +1272,6 @@ func resolveFormData(page map[string]any, dbURL string) map[string]any {
return nil
}
func pushIntro(buf *strings.Builder, intro string) {
pushIntroAndForm(buf, intro, nil)
}
@@ -1364,6 +1363,12 @@ func renderFragment(page map[string]any, dbURL, slot string) string {
// RenderPage builds full-page HTML (or a part fragment when partID is set).
func RenderPage(page map[string]any, dbURL string, partID string) string {
// Explicit View Documents already own their structure and document shell.
if partID == "" && page != nil {
if html, ok := page["artifact_html"].(string); ok {
return html
}
}
if page == nil {
page = map[string]any{}
}