template

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderDirectory

func RenderDirectory(data *DirPageData) ([]byte, error)

func RenderError added in v0.2.0

func RenderError(data *ErrorPageData) ([]byte, error)

func RenderMarkdown

func RenderMarkdown(data *PageData) ([]byte, error)

Types

type DirEntry

type DirEntry struct {
	Name  string
	IsDir bool
	URL   string
}

type DirPageData

type DirPageData struct {
	Title     string
	Path      string
	Entries   []DirEntry
	Theme     string
	WatchPath string
}

type ErrorPageData added in v0.2.0

type ErrorPageData struct {
	Title   string
	Theme   string
	Status  int
	Message string
	Hints   []template.HTML
}

type PageData

type PageData struct {
	Title     string
	Content   template.HTML
	Theme     string
	WatchPath string
	SourceURL string
}

Jump to

Keyboard shortcuts

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