summaryrefslogtreecommitdiffstats
path: root/hugolib/filesystems/basefs.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-23 09:16:42 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-23 21:09:00 +0100
commitf9b4eb4f3968d32f45e0168c854e6b0c7f3a90b0 (patch)
treebca87a80e39fe35b57fcb36b75fa34e6a1da677a /hugolib/filesystems/basefs.go
parente82b2dc8c1628f2da33e5fb0bae1b03e0594ad2c (diff)
Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites. Fixes #5460
Diffstat (limited to 'hugolib/filesystems/basefs.go')
-rw-r--r--hugolib/filesystems/basefs.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/filesystems/basefs.go b/hugolib/filesystems/basefs.go
index 8fc1861b8..ee1c870d9 100644
--- a/hugolib/filesystems/basefs.go
+++ b/hugolib/filesystems/basefs.go
@@ -81,6 +81,7 @@ type SourceFilesystems struct {
Layouts *SourceFilesystem
Archetypes *SourceFilesystem
Assets *SourceFilesystem
+ Resources *SourceFilesystem
// This is a unified read-only view of the project's and themes' workdir.
Work *SourceFilesystem
@@ -375,6 +376,13 @@ func (b *sourceFilesystemsBuilder) Build() (*SourceFilesystems, error) {
}
b.result.Assets = sfs
+ sfs, err = b.createFs(true, false, "resourceDir", "resources")
+ if err != nil {
+ return nil, err
+ }
+
+ b.result.Resources = sfs
+
sfs, err = b.createFs(false, true, "", "")
if err != nil {
return nil, err