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

@@ -1824,10 +1824,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 {