pagr

A 'static site generator', built using dati.
Log | Files | Refs | Atom

commit 13542d745a178caa938cef5f00ac1746112eaa7c
parent de094b7bbaa853ed1967bc7581f2baca6526a50a
Author: gearsix <gearsix@tuta.io>
Date:   Sun,  3 Oct 2021 13:32:36 +0100

DefaultTemplate -> DefaultTemplateName

Diffstat:
Mpage.go | 4++--
Mtemplate.go | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/page.go b/page.go @@ -262,14 +262,14 @@ func NewPage(path string, updated time.Time) Page { // GetTemplate will check if `p.Meta` has the key `template` or `Template` // (in the order) and return the value of the first existing key as a string. // If `.Meta` neither has the key `template` or `Template`, then it will -// return `DefaultTemplate` from [./template.go]. +// return `DefaultTemplateName` from [./template.go]. func (p *Page) GetTemplate() string { if v, ok := p.Meta["template"]; ok { return v.(string) } else if v, ok = p.Meta["Template"]; ok { return v.(string) } else { - return DefaultTemplate + return DefaultTemplateName } } diff --git a/template.go b/template.go @@ -8,9 +8,9 @@ import ( "notabug.org/gearsix/suti" ) -// DefaultTemplate provides the default name for the template used +// DefaultTemplateName provides the default name for the template used // when one isn't specified in a `Page.Meta`. -const DefaultTemplate = "root" +const DefaultTemplateName = "root" // loadPaths calls `filepath.Walk` on dir and loads all // non-directory filepaths in `dir`