transmet/templates/html_template.txt

6 lines
350 B
Plaintext

{{range $nc := .news}}{{template "news-category" $nc}}{{end}}
{{define "news-category"}}<h{{$.HeaderDepth 1 }}>{{$.Name}}</h{{$.HeaderDepth 1 }}>
{{range $n := .News}}{{template "news" $n}}{{end}}{{range $nc := .Children}}{{template "news-category" $nc}}{{end}}{{end}}
{{define "news"}}<p><a href="{{.Url}}">{{.Title}}</a><br/>
{{.Notes}}</p>
{{end}}