Ignore content files ending in ~

Also add *~ to .gitignore
This commit is contained in:
Ask Bjørn Hansen 2014-02-27 21:26:17 -08:00 committed by spf13
parent 0becad727a
commit e53bc948a5
2 changed files with 11 additions and 1 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@ hugo.exe
*.swp *.swp
*.swo *.swo
.DS_Store .DS_Store
*~

View file

@ -117,5 +117,14 @@ func (f *Filesystem) avoid(filePath string) bool {
} }
func ignoreDotFile(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
} }