Documentation
¶
Overview ¶
This file handles generating redirect HTML pages for URL aliases. Aliases allow old URLs to redirect to new canonical page locations.
This file handles copying static assets from static/ to the output directory, with support for minification and SCSS compilation.
Generic taxonomy page generation for tags, categories, series, and custom taxonomies. Builds index pages and term pages with support for series ordering and navigation.
Package builder provides template loading and management.
Index ¶
- type AtomAuthor
- type AtomEntry
- type AtomFeed
- type AtomLink
- type Builder
- func (b *Builder) CopyStaticFile(srcPath string) error
- func (b *Builder) Generate(contentRoot *content.Node) error
- func (b *Builder) GenerateClean(contentRoot *content.Node) error
- func (b *Builder) GenerateWithOptions(contentRoot *content.Node, _ GenerateOptions) error
- func (b *Builder) ReloadTemplates() error
- type GenerateOptions
- type SearchEntry
- type Sitemap
- type SitemapURL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomAuthor ¶
AtomAuthor represents the author information in an Atom feed.
type AtomEntry ¶
type AtomEntry struct {
Title string `xml:"title"`
ID string `xml:"id"`
Updated string `xml:"updated"`
Published string `xml:"published"`
Summary string `xml:"summary,omitempty"`
Content struct {
Type string `xml:"type,attr"`
Data string `xml:",cdata"`
} `xml:"content"`
Links []AtomLink `xml:"link"`
Categories []string `xml:"category,omitempty"`
}
AtomEntry represents a single entry in an Atom feed.
type AtomFeed ¶
type AtomFeed struct {
XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"`
Title string `xml:"title"`
ID string `xml:"id"`
Updated string `xml:"updated"`
Author *AtomAuthor `xml:"author,omitempty"`
Links []AtomLink `xml:"link"`
Entries []AtomEntry `xml:"entry"`
}
AtomFeed represents an Atom XML feed structure.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
NewBuilder creates a new Builder with loaded templates.
func (*Builder) CopyStaticFile ¶ added in v0.0.33
CopyStaticFile copies a single static file from static/ to the output directory
func (*Builder) Generate ¶
Generate processes the content tree and generates the complete static site.
func (*Builder) GenerateClean ¶ added in v0.0.39
GenerateClean performs a full rebuild and cleans the output directory first. Use this after file deletions to remove stale content.
func (*Builder) GenerateWithOptions ¶ added in v0.0.32
func (b *Builder) GenerateWithOptions(contentRoot *content.Node, _ GenerateOptions) error
GenerateWithOptions processes the content tree with specific generation options. For backwards compatibility, this always performs a full build.
func (*Builder) ReloadTemplates ¶
ReloadTemplates reloads all templates from disk for development mode.
type GenerateOptions ¶ added in v0.0.32
type GenerateOptions struct {
ContentDir string
OldTaxonomyValues map[string]map[string]any // Pre-snapshotted taxonomy values: relPath -> {field -> value}
}
GenerateOptions configures how the site generation should run.
type SearchEntry ¶ added in v0.1.0
type SearchEntry struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
Tags []string `json:"tags"`
URL string `json:"url"`
Date string `json:"date"`
}
SearchEntry represents a single document in the search index
type Sitemap ¶
type Sitemap struct {
XMLName xml.Name `xml:"http://www.sitemaps.org/schemas/sitemap/0.9 urlset"`
URLs []SitemapURL `xml:"url"`
}
Sitemap represents an XML sitemap for search engines.