content

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildrenRenderConfig

type ChildrenRenderConfig struct {
	Path   string
	Layout string
	Limit  int
	SortBy string
	Order  string
	Pages  []PageData
	Marker string
}

type PageData

type PageData struct {
	Title            string
	Slug             string
	URL              string
	Path             string
	RawContent       string
	HTMLContent      string
	Frontmatter      map[string]any
	IsIndex          bool
	Children         []PageData
	ChildrenRenders  []ChildrenRenderConfig
	QuoteCodeRenders []QuoteCodeRenderConfig
}

func GetChildrenForPath

func GetChildrenForPath(allPages []PageData, path string) []PageData

func ScanDir

func ScanDir(root, basePath string) ([]PageData, error)

func SortAndLimitPages

func SortAndLimitPages(pages []PageData, sortBy, order string, limit int) []PageData

type QuoteCodeRenderConfig

type QuoteCodeRenderConfig struct {
	Quote string
	Lang  string
	Code  string
}

type SiteContext

type SiteContext struct {
	Config      config.SiteConfig
	Pages       []PageData
	CurrentPage *PageData
}

func BuildContext

func BuildContext(siteConfig config.SiteConfig, pages []PageData) SiteContext

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL