Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-14 18:02:04 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-08 14:26:16 +0300
commit0a56f2af4e1969e76e94fdfb56d1bbed0e685625 (patch)
treedb258649317ea350ce6c56f00483d5655963de16 /hugolib/filesystems
parent9e360d3844f5077c65649e4c9c98f5cbd1c3efc0 (diff)
Revert "Revert "Allow rendering static files to disk and dynamic to memory in server mode""
This reverts commit 64b7b7a89753a39661219b2fcb92d7f185a03f63.
Diffstat (limited to 'hugolib/filesystems')
-rw-r--r--hugolib/filesystems/basefs.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/hugolib/filesystems/basefs.go b/hugolib/filesystems/basefs.go
index 6e3f88a4b..0290d2e1c 100644
--- a/hugolib/filesystems/basefs.go
+++ b/hugolib/filesystems/basefs.go
@@ -71,6 +71,9 @@ type BaseFs struct {
// A read-only filesystem starting from the project workDir.
WorkDir afero.Fs
+ // The filesystem used for renderStaticToDisk.
+ PublishFsStatic afero.Fs
+
theBigFs *filesystemsCollector
// Locks.
@@ -438,15 +441,17 @@ func NewBase(p *paths.Paths, logger loggers.Logger, options ...func(*BaseFs) err
publishFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Destination, p.AbsPublishDir))
sourceFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Source, p.WorkingDir))
+ publishFsStatic := afero.NewBasePathFs(fs.Source, p.AbsPublishDir)
// Same as sourceFs, but no decoration. This is what's used by os.ReadDir etc.
workDir := afero.NewBasePathFs(afero.NewReadOnlyFs(fs.Source), p.WorkingDir)
b := &BaseFs{
- SourceFs: sourceFs,
- WorkDir: workDir,
- PublishFs: publishFs,
- buildMu: lockedfile.MutexAt(filepath.Join(p.WorkingDir, lockFileBuild)),
+ SourceFs: sourceFs,
+ WorkDir: workDir,
+ PublishFs: publishFs,
+ PublishFsStatic: publishFsStatic,
+ buildMu: lockedfile.MutexAt(filepath.Join(p.WorkingDir, lockFileBuild)),
}
for _, opt := range options {