Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Caser = cases.Title(language.AmericanEnglish)
View Source
var DefaultLayoutTemplate []byte
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Contents template.HTML // Configurable Attributes Links []*NavLink Theme string DocTitle string PageTitle string }
Template Context
type View ¶
type View struct { Path string Markdown *md.MD HTML []byte Templ *template.Template Links []*NavLink // contains filtered or unexported fields }
func WithNavigation ¶
function WithNavigation populates a NavLink list in the View struct to build context when rendering the layout
func (*View) BuildHTMLFileContents ¶
func (*View) GetTemplate ¶
function getTemplate checks for the presence of a template dir, then for the following patterns before following back to the default embedded above
- {template_dir}/{layout}.html
- {template_dir}/{name}.html
- {template_dir}/base.html
- DefaultLayoutTemplate (/cmd/build/views/base.html)
Click to show internal directories.
Click to hide internal directories.