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

@@ -1829,10 +1829,10 @@ func (s *Site) lookupTemplate(layouts ...string) (tpl.Template, bool) {
return nil, false
}
func (s *Site) publish(statCounter *uint64, path string, r io.Reader) (err error) {
func (s *Site) publish(statCounter *uint64, path string, r io.Reader, fs afero.Fs) (err error) {
s.PathSpec.ProcessingStats.Incr(statCounter)
return helpers.WriteToDisk(filepath.Clean(path), r, s.BaseFs.PublishFs)
return helpers.WriteToDisk(filepath.Clean(path), r, fs)
}
func (s *Site) kindFromFileInfoOrSections(fi *fileInfo, sections []string) string {