render

package
v16.0.0-...-c66924d Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	T = template.Must(template.New(layoutName).Parse(layoutTpl))
)

Functions

func Render

func Render(o *Options, w io.Writer, r io.Reader) error

Types

type Options

type Options struct {
	Markdown     goldmark.Markdown
	MarkdownSkip bool // skip markdown processing

	Minify       *minify.M
	Template     *template.Template
	TemplateName string

	Data PageData
}

type PageData

type PageData struct {
	// mandatory
	URLCanonical string
	Date         string // for blog posts
	GTMID        string // for analytics
	Compact      bool

	// Extracted
	Title       string
	Description string
	H1          string
	H2          string
	Style       string

	// Filled
	Main string
}

func (*PageData) FromMap

func (d *PageData) FromMap(md map[string]interface{})

Jump to

Keyboard shortcuts

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