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

Updates #9625
This commit is contained in:
SatowTakeshi
2021-04-18 16:13:00 +09:00
committed by Bjørn Erik Pedersen
parent b9a1be2f99
commit 7d8011ed63
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")