Documentation
¶
Overview ¶
Package htmlsite generates multi-page HTML documentation sites from graph data.
Index ¶
- func CountEdgeTypes(edges []*graph.Edge) map[string]int
- func CountNodeTypes(nodes []*graph.Node) map[string]int
- func FilterGraphByPath(nodes []*graph.Node, edges []*graph.Edge, localPath string) ([]*graph.Node, []*graph.Edge)
- func GetSystemNodes(nodes []*graph.Node, edges []*graph.Edge) ([]*graph.Node, []*graph.Edge)
- func HasSystemNode(nodes []*graph.Node) bool
- type CommunityInfo
- type Generator
- type IndexData
- type ServiceData
- type ServiceInfo
- type ServiceMapping
- type SiteContent
- type Templates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountEdgeTypes ¶
CountEdgeTypes returns a map of edge type -> count.
func CountNodeTypes ¶
CountNodeTypes returns a map of node type -> count.
func FilterGraphByPath ¶
func FilterGraphByPath(nodes []*graph.Node, edges []*graph.Edge, localPath string) ([]*graph.Node, []*graph.Edge)
FilterGraphByPath returns nodes and edges that belong to a specific local path. It filters nodes based on the source_file attribute prefix.
func GetSystemNodes ¶
GetSystemNodes returns all system-level nodes (system, service, repository types).
func HasSystemNode ¶
HasSystemNode checks if the graph contains a system node (indicating multi-service mode).
Types ¶
type CommunityInfo ¶
CommunityInfo contains metadata about a community for display.
type Generator ¶
type Generator struct {
// Title is the site title.
Title string
// Description is an optional site description.
Description string
// DarkMode enables dark theme.
DarkMode bool
// IncludeCommunities enables community page generation.
IncludeCommunities bool
// ExcludeIaC filters out Helm, Terraform, and other IaC nodes.
ExcludeIaC bool
}
Generator creates multi-page HTML documentation sites.
func NewGenerator ¶
func NewGenerator() *Generator
NewGenerator creates a Generator with default settings.
type IndexData ¶
type IndexData struct {
Title string
Description string
DarkMode bool
CSS string
TotalNodes int
TotalEdges int
SourceCount int
HasServices bool
HasCommunities bool
Services []ServiceInfo
Communities []CommunityInfo
GraphJSON template.JS
}
IndexData is the template data for the index page.
type ServiceData ¶
type ServiceData struct {
SiteTitle string
DarkMode bool
CSS string
HasCommunities bool
Service ServiceInfo
NodeTypeCounts map[string]int
EdgeTypeCounts map[string]int
GraphJSON template.JS
}
ServiceData is the template data for service pages.
type ServiceInfo ¶
type ServiceInfo struct {
Name string
Slug string
Description string
RepoURL string
LocalPath string
NodeCount int
EdgeCount int
}
ServiceInfo contains metadata about a service for display.
type ServiceMapping ¶
ServiceMapping maps a service to its repository and local path.
func BuildServiceMappings ¶
func BuildServiceMappings(nodes []*graph.Node, edges []*graph.Edge, manifest *source.Manifest) []ServiceMapping
BuildServiceMappings extracts service-to-repo mappings from graph data. It finds svc:X nodes and their links_to repo:URL edges, then matches repo URLs to manifest source paths.