Browse Source

ignore non-html files while loading templates

tags/v1.8.0
Morgan Bazalgette 1 year ago
parent
commit
21deb10fbc
Signed by: Morgan Bazalgette <the@howl.moe> GPG Key ID: 40D328300D245DA5
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      templates.go

+ 5
- 0
templates.go View File

@@ -55,6 +55,11 @@ func loadTemplates(subdir string) {
continue
}

// ignore non-html files
if strings.HasPrefix(i.Name(), ".html") {
continue
}

fullName := "templates" + subdir + "/" + i.Name()
_c := parseConfig(fullName)
var c templateConfig

Loading…
Cancel
Save