Revert "Revert "Allow rendering static files to disk and dynamic to memory in server mode""

This reverts commit 64b7b7a897.
This commit is contained in:
Bjørn Erik Pedersen
2022-03-14 16:02:04 +01:00
parent 9e360d3844
commit 0a56f2af4e
8 changed files with 69 additions and 25 deletions

View File

@@ -652,6 +652,9 @@ func (c *commandeer) copyStaticTo(sourceFs *filesystems.SourceFilesystem) (uint6
syncer.ChmodFilter = chmodFilter
syncer.SrcFs = fs
syncer.DestFs = c.Fs.Destination
if c.renderStaticToDisk {
syncer.DestFs = c.Fs.DestinationStatic
}
// 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")