Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMissingBody = errors.New("if the first line is '---' you have to include a yaml header as described in the atwhy readme")
)
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { // Meta contains additional data which can be used by the generators. // It is also available inside the template for example with // {{ .Meta.Title }} Meta MetaData `yaml:"meta"` Server ServerData `yaml:"server"` }
type Markdown ¶
type Markdown struct { ID string ProjectPathPrefix string Name string Path string Header Header // contains filtered or unexported fields }
Markdown
@WHY doc_template_usage The templates should be markdown files with a yaml header for metadata.
You can access a tag called `\@WHY example_tag` using
# Example {{ .Escape "{{ .Tag.example_tag }}" }}
Note: This uses the Go templating engine. Therefore you can use the [Go templating syntax](https://learn.hashicorp.com/tutorials/nomad/go-template-syntax?in=nomad/templates).
func TestTemplate ¶ added in v0.7.0
type MetaData ¶
type MetaData struct { // Title is for example used in the html generator to create the navigation buttons. // If not set, it will default to the template file-name (excluding .tpl.md) Title string `yaml:"title"` }
type ServerData ¶
type ServerData struct { // Index defines if this template should be used as "index.html". // Note that there can only be one page in each folder which is the index. Index bool `yaml:"index"` }
Click to show internal directories.
Click to hide internal directories.