commit ae7112977d57dddc3a4b990c9a93ae74d1c61057
parent eb4288e3cd47fae5c519ae0fb8e654828540e7a6
Author: Noah Campbell <noahcampbell@gmail.com>
Date: Fri, 23 Aug 2013 13:51:59 -0700
Skip "dot" files in layout
As a vim user, .filename.swp files pop up. This change prevents hugo
from reading those files.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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