From: Noah Campbell Date: Fri, 23 Aug 2013 20:51:59 +0000 (-0700) Subject: Skip "dot" files in layout X-Git-Tag: v0.9~146 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ae711297;p=brevno-suite%2Fhugo Skip "dot" files in layout As a vim user, .filename.swp files pop up. This change prevents hugo from reading those files. --- diff --git a/hugolib/site.go b/hugolib/site.go index d6cd343c..a6447521 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -163,6 +163,9 @@ func (s *Site) loadTemplates() { } if !fi.IsDir() { + if ignoreDotFile(path) { + return nil + } filetext, err := ioutil.ReadFile(path) if err != nil { return err