From ae7112977d57dddc3a4b990c9a93ae74d1c61057 Mon Sep 17 00:00:00 2001 From: Noah Campbell Date: Fri, 23 Aug 2013 13:51:59 -0700 Subject: [PATCH] Skip "dot" files in layout As a vim user, .filename.swp files pop up. This change prevents hugo from reading those files. --- hugolib/site.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hugolib/site.go b/hugolib/site.go index d6cd343cd..a64475216 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