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

@@ -35,6 +35,9 @@ type Fs struct {
// Destination is Hugo's destination file system.
Destination afero.Fs
// Destination used for `renderStaticToDisk`
DestinationStatic afero.Fs
// Os is an OS file system.
// NOTE: Field is currently unused.
Os afero.Fs
@@ -69,10 +72,11 @@ func NewFrom(fs afero.Fs, cfg config.Provider) *Fs {
func newFs(base afero.Fs, cfg config.Provider) *Fs {
return &Fs{
Source: base,
Destination: base,
Os: &afero.OsFs{},
WorkingDir: getWorkingDirFs(base, cfg),
Source: base,
Destination: base,
DestinationStatic: base,
Os: &afero.OsFs{},
WorkingDir: getWorkingDirFs(base, cfg),
}
}