mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
committed by
Bjørn Erik Pedersen
parent
5e191ccf4c
commit
559b4007f7
@@ -579,8 +579,13 @@ func (c *commandeer) copyStatic() error {
|
||||
// Now that we are using a unionFs for the static directories
|
||||
// We can effectively clean the publishDir on initial sync
|
||||
syncer.Delete = c.Cfg.GetBool("cleanDestinationDir")
|
||||
|
||||
if syncer.Delete {
|
||||
c.Logger.INFO.Println("removing all files from destination that don't exist in static dirs")
|
||||
|
||||
syncer.DeleteFilter = func(f os.FileInfo) bool {
|
||||
return f.IsDir() && strings.HasPrefix(f.Name(), ".")
|
||||
}
|
||||
}
|
||||
c.Logger.INFO.Println("syncing static files to", publishDir)
|
||||
|
||||
|
Reference in New Issue
Block a user