pages

package
v0.0.0-...-93fa499 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateIndexPage

func GenerateIndexPage(contentDir, templatePath, outputPath, siteTitle, siteAuthor, siteAuthorBio string) error

func GeneratePage

func GeneratePage(contentPath, templatePath, outputPath string) error

func RenderPage

func RenderPage(page *Page, templatePath string) ([]byte, error)

Types

type IndexPage

type IndexPage struct {
	SiteTitle     string
	SiteAuthor    string
	SiteAuthorBio string
	Content       template.HTML
	Posts         []PostMeta
}

IndexPage is the index page with posts listing

type Meta

type Meta struct {
	Tags      []string
	SiteTitle string
}

type Page

type Page struct {
	Title       string
	Description string
	Author      string
	Date        string
	Content     template.HTML
	Meta        Meta
}

Page represents a single rendered page

func BuildPage

func BuildPage(contentPath string) (*Page, error)

type PostMeta

type PostMeta struct {
	Title       string
	Description string
	Author      string
	Date        string
	URL         string
	Filename    string
}

PostMeta is a struct for blog post listing

func CollectPosts

func CollectPosts(contentDir string) ([]PostMeta, error)

Jump to

Keyboard shortcuts

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