Documentation
¶
Index ¶
- type AssetRefs
- type Renderer
- func (r *Renderer) InvalidateCache()
- func (r *Renderer) Render404(outputDir string, allPages []*content.Page) error
- func (r *Renderer) RenderPage(page *content.Page, allPages []*content.Page) error
- func (r *Renderer) RenderSearchPage(outputDir string) error
- func (r *Renderer) RenderTagPage(tag string, pages []*content.Page, outputDir string) error
- func (r *Renderer) RenderTaxonomyPage(tags []TagCount, outputDir string) error
- type SidebarItem
- type SiteData
- type TagCount
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetRefs ¶
type AssetRefs struct {
CSS string
JSHead string
JS string
FlexSearch string
KaTeX string
Extra map[string]string // original basename → fingerprinted URL
}
AssetRefs holds fingerprinted asset URLs.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer handles template rendering.
func (*Renderer) InvalidateCache ¶
func (r *Renderer) InvalidateCache()
InvalidateCache clears the template cache (useful after layout file changes).
func (*Renderer) RenderPage ¶
RenderPage renders a single page to its OutputPath.
func (*Renderer) RenderSearchPage ¶
RenderSearchPage renders the /search/ page.
func (*Renderer) RenderTagPage ¶
RenderTagPage renders a tag term page.
type SidebarItem ¶
type SidebarItem struct {
Title string
URL string
Active bool
HasActive bool
IsParent bool
Children []*SidebarItem
}
SidebarItem is a pre-built sidebar navigation node.
type TemplateData ¶
type TemplateData struct {
Page *content.Page
Site *SiteData
Assets AssetRefs
Pages []*content.Page // for list pages: children or tag members
Tags []TagCount // for taxonomy page
GraphDataJSON string // JSON string, embedded inline for type=graph
TreeDataJSON string // JSON string, embedded inline for type=tree
CalendarDataJSON string // JSON string, embedded inline for type=calendar
SidebarItems []*SidebarItem // pre-built sidebar nav tree
SidebarRoot *content.Page // page whose subtree is shown in sidebar
SidebarBack *content.Page // back-link target (nil = no back link)
PrevPage *content.Page // previous sibling (for pager)
NextPage *content.Page // next sibling (for pager)
}
TemplateData is the data passed to all templates.
Click to show internal directories.
Click to hide internal directories.