mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
Ignore content files ending in ~
Also add *~ to .gitignore
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ hugo.exe
|
||||
*.swp
|
||||
*.swo
|
||||
.DS_Store
|
||||
*~
|
||||
|
@ -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