Skip to content

Commit

Permalink
Skip hidden files when parsing templates
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
Merovius committed Sep 13, 2015
1 parent 6167694 commit 786339a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func init() {
if filepath.Base(f) == "layout.html" {
continue
}
// Skip hidden files
if filepath.Base(f)[0] == '.' {
continue
}
content, err := ioutil.ReadFile(f)
if err != nil {
log.Fatalf("Could not read %q: %v", f, err)
Expand Down

0 comments on commit 786339a

Please sign in to comment.