Documentation
¶
Index ¶
- func BuildCalendarData(pages []*content.Page) map[string][]CalendarEntry
- func BuildCalendarJSON(pages []*content.Page, outputDir string) error
- func BuildGraphJSON(pages []*content.Page, outputDir string) error
- func BuildSearchJSON(pages []*content.Page, outputDir string) error
- func BuildSitemap(pages []*content.Page, baseURL, outputDir string) error
- func BuildTreeJSON(pages []*content.Page, outputDir string) error
- type CalendarEntry
- type GraphData
- type GraphLink
- type GraphNode
- type SearchEntry
- type TreeData
- type TreeItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCalendarData ¶
func BuildCalendarData(pages []*content.Page) map[string][]CalendarEntry
BuildCalendarData builds the calendar data (does NOT write file). Returns a map from date string (YYYY-MM-DD) to list of entries.
func BuildCalendarJSON ¶
BuildCalendarJSON builds the calendar JSON at outputDir/calendar.json (backward compat wrapper).
func BuildGraphJSON ¶
BuildGraphJSON builds the graph JSON at outputDir/graph.json (backward compat wrapper).
func BuildSearchJSON ¶
BuildSearchJSON builds the search index JSON file at outputDir/en.search-data.json.
func BuildSitemap ¶
BuildSitemap generates sitemap.xml in outputDir.
Types ¶
type CalendarEntry ¶
type CalendarEntry struct {
URL string `json:"url"`
Title string `json:"title"`
Path string `json:"path"`
Date string `json:"date"`
Hour string `json:"hour"`
Time string `json:"time"`
Words int `json:"words"`
RT string `json:"rt"`
}
CalendarEntry is a single entry in the calendar data.
type GraphData ¶
GraphData is the full graph data structure (bipartite: page nodes + tag nodes).
func BuildGraphData ¶
BuildGraphData builds the graph data structure (does NOT write file). Uses a bipartite model: each tag is its own node, links go page → tag node.
type GraphLink ¶
type GraphLink struct {
Source string `json:"source"`
Target string `json:"target"`
Kind string `json:"kind"` // "tree" | "tag"
}
GraphLink represents an edge in the knowledge graph.
type GraphNode ¶
type GraphNode struct {
ID string `json:"id"`
URL string `json:"url"`
Title string `json:"title"`
Section string `json:"section"`
Kind string `json:"kind"`
Depth int `json:"depth"`
Tags []string `json:"tags"`
ReadTime int `json:"readTime"`
}
GraphNode represents a node in the knowledge graph.
type SearchEntry ¶
SearchEntry matches Hugo's search JSON output format. { "/path/": { "title": "Title", "data": { "": "plain text..." } } }
type TreeData ¶
type TreeData struct {
Items []TreeItem `json:"items"`
RootID string `json:"rootId"`
RootName string `json:"rootName"`
}
TreeData is the flat tree data structure with parent pointers.
func BuildTreeData ¶
BuildTreeData builds the flat tree data structure (does NOT write file).
type TreeItem ¶
type TreeItem struct {
ID string `json:"id"`
Parent string `json:"parent"`
Name string `json:"name"`
Kind string `json:"kind"`
Section string `json:"section"`
Depth int `json:"depth"`
ReadTime int `json:"readTime"`
URL string `json:"url"`
SubCount int `json:"subCount"`
}
TreeItem is a flat node in the tree data structure.