Template
A file named tmpl.html, either in site directory or static assets, is used to render the pages.
Examples
-
- Recursive navigation menu
- GetDef features:
rtl 1,icon /icon.svg,page_suffix ...
-
{{if}}conditions for multi-host{{.ListM}}with access to subpage{{.Head}}, to obtain custom metadata
-
- Uses
{{.Object}}which is a bit advanced - Object documents like index.json
- Uses
-
- Dedicated static assets directory
{{.ModTime.Format}}, customdatefmtin index
Writing
Example template usages:
{{.Head.custom_key}}
{{.ModTime.Format "02/01/2006"}}
{{.Host}}
{{.GetDef "custom_key"}}
At the moment, refer to:
- Go: text/template
go doc ./internal Page(page.go)