document

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestPaths

func GetTestPaths(rootDocument string, urlPath string) []string

Types

type MetaTag

type MetaTag struct {
	Attribute string `yaml:"attribute"`
	Value     string `yaml:"value"`
}

type Page

type Page struct {
	Params  PageParams
	Content string
}

func RenderPath

func RenderPath(path string) (Page, bool)

func (Page) Render

func (p Page) Render(w io.Writer) error

type PageParams

type PageParams struct {
	Title string    `yaml:"title"`
	Lang  string    `yaml:"lang" default:"en"`
	Meta  []MetaTag `yaml:"meta" default:"[]MetaTag{}"`
	CSS   []string  `yaml:"css" default:"[]string{}"`
	JS    []string  `yaml:"js" default:"[]string{}"`
}

Jump to

Keyboard shortcuts

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