aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugofs
diff options
context:
space:
mode:
authorSatowTakeshi <[email protected]>2021-04-18 16:13:00 +0900
committerBjørn Erik Pedersen <[email protected]>2022-03-08 19:27:54 +0100
commit7d8011ed63d587b87a7c182748914fe146590093 (patch)
treecde6c99c5a439e64e0a2e5c9d2f0d4b03eba6577 /hugofs
parentb9a1be2f9961516a674ff15a409433606e70ac7b (diff)
downloadhugo-7d8011ed63d587b87a7c182748914fe146590093.tar.gz
hugo-7d8011ed63d587b87a7c182748914fe146590093.zip
Allow rendering static files to disk and dynamic to memory in server mode
Updates #9625
Diffstat (limited to 'hugofs')
-rw-r--r--hugofs/fs.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/hugofs/fs.go b/hugofs/fs.go
index 54d962553..95645204e 100644
--- a/hugofs/fs.go
+++ b/hugofs/fs.go
@@ -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),
}
}