Documentation
¶
Overview ¶
Package systheme is the Fuego system theme: it renders the engineering artifacts a repository already contains — OpenAPI specs, DBML schemas, Playwright suites, Dockerfiles, Kubernetes manifests, ADRs, Mermaid diagrams, and Markdown docs — as one navigable system site. Register it on any Fuego engine with eng.Use(systheme.Pack()), or point the fuego-systheme CLI at a repository; nothing is written into the repo either way.
Index ¶
- func BuildOverview(pages []*core.Page) ([]*core.Page, error)
- func EnrichPages(pages []*core.Page) ([]*core.Page, error)
- func Pack() core.Pack
- func ResolveRefLinks(pages []*core.Page) ([]*core.Page, error)
- func RewriteContentLinks(pages []*core.Page) ([]*core.Page, error)
- func Run(repoPath string, opts Options) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOverview ¶
BuildOverview (an Index hook) appends the dashboard: one virtual page at / summarizing every artifact family with counts and entry links. It runs after ROUTE, so entries carry the pages' real URLs.
func EnrichPages ¶
EnrichPages (an AfterParse hook) defaults the layout for the parsers that deliberately emit none (markdown, docker, kubernetes, adr — their schema.md contracts leave layout to the consuming pack) and lifts identity out of node attributes into the envelope where taxonomies and listings can see it. All envelope values written here are JSON-shaped, so pages stay cache-eligible.
func Pack ¶
Pack returns the systheme format pack: every fuego-formats parser plus the engine's markdown parser (this repo contains no parser code), the system theme, route/taxonomy/ignore defaults, and the hooks that default layouts and build the overview dashboard.
func ResolveRefLinks ¶
ResolveRefLinks (a BeforeRender hook) turns the cross-page pointers the parsers emit into browser-resolvable relative hrefs, so renderer templates — which see only the node, never .Site — can link without knowing the base URL:
- tree ref nodes (openapi/dbml/playwright *-ref, dbml-ref) carry a "slug" relative to the tree root; the href climbs out of the current page's slug path first
- taxonomy nodes (page-ref, term-ref) carry a site-absolute "url"
Both gain an "href" attribute relative to the page they render on. It runs BeforeRender deliberately: URLs exist only after ROUTE, and mutations here never reach the build cache (which stores post-PARSE state).
func RewriteContentLinks ¶
RewriteContentLinks (a BeforeRender hook) keeps a repository's own relative Markdown links working on the rendered site. Content in a scanned repo is written for the repo view — "see [the schema](../backend/db/schema.dbml)" — so this hook resolves each relative href against the page's source location, and when the target file rendered as a page (including as a tree root), replaces the href with the relative URL of that page. Links to files that aren't pages, absolute URLs, and anchors pass through untouched.
Types ¶
type Options ¶
type Options struct {
SiteName string // site title (default: "System Docs")
BaseURL string // base URL for the site (default: "")
Output string // output directory (default: "build")
Command string // "build", "serve", or "validate" (default: "serve")
StrictLinks bool // fail the build on a broken internal link
}
Options configures a fuego-systheme site build.