Skip to content

Commit ea9cd93

Browse files
committed
cleanup logic of releaser timeline
1 parent ef1fe81 commit ea9cd93

3 files changed

Lines changed: 263 additions & 257 deletions

File tree

handler/app/template.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ type Page map[string]filename
7878

7979
// Pages returns a map of the template names and their corresponding filenames.
8080
func (t *Templ) Pages() *Page {
81+
// To embed a template within one of these .tmpl pages,
82+
// use the parseFS() func found later in this file.
83+
//
84+
// Embed file example:
85+
// {{- define "abc" }}<h1>Hi!</h1>{{- end}}
86+
//
87+
// Template page usage:
88+
// {{ template "abc" }}
89+
//
90+
// Or to pass a maximum of one value:
91+
// {{ template "abc" $myVar }}
92+
8193
return &Page{
8294
"api-info": "apiinfo.tmpl",
8395
"apps": "apps.tmpl",
@@ -493,6 +505,8 @@ func (t *Templ) parseFS(db *sql.DB, name filename) *template.Template {
493505
files = append(files, GlobTo("artifactsedit.tmpl"))
494506
case categoriesTmpl:
495507
files = append(files, GlobTo("categoriesmore.tmpl"))
508+
case "releaseryear.tmpl":
509+
files = append(files, GlobTo("releasertimeline.tmpl"))
496510
case websitesTmpl:
497511
const individualWebsite = "website.tmpl"
498512
files = append(files, GlobTo(individualWebsite))

0 commit comments

Comments
 (0)