mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Skip "dot" files in layout
As a vim user, .filename.swp files pop up. This change prevents hugo from reading those files.
This commit is contained in:
@@ -163,6 +163,9 @@ func (s *Site) loadTemplates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !fi.IsDir() {
|
if !fi.IsDir() {
|
||||||
|
if ignoreDotFile(path) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
filetext, err := ioutil.ReadFile(path)
|
filetext, err := ioutil.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user