mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Ignore content files ending in ~
Also add *~ to .gitignore
This commit is contained in:
@@ -117,5 +117,14 @@ func (f *Filesystem) avoid(filePath string) bool {
|
||||
}
|
||||
|
||||
func ignoreDotFile(filePath string) bool {
|
||||
return filepath.Base(filePath)[0] == '.'
|
||||
base := filepath.Base(filePath)
|
||||
if base[0] == '.' {
|
||||
return true
|
||||
}
|
||||
|
||||
if base[len(base)-1] == '~' {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user