page

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Name string
	// contains filtered or unexported fields
}

func NewPage

func NewPage(name string, parent *Page) *Page

func ParseCompleteTree

func ParseCompleteTree() *Page

ParseCompleteTree parses the pages directory and constructs a complete page tree with parsed templates. It returns the root page

func (*Page) GetDeepChildByUri

func (p *Page) GetDeepChildByUri(uri string) (*Page, error)

GetDeepChildByUri uses a breadth first search to find a page which matches the uri path exactly from the current page It returns a page if one is found, and any errors encountered

func (*Page) HasTemplate

func (p *Page) HasTemplate() bool

HasTemplate is used to determine whether a template has been parsed for a given page It returns a boolean

func (*Page) RenderTemplate

func (p *Page) RenderTemplate(w io.Writer)

Jump to

Keyboard shortcuts

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