aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugofs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-11-16 19:54:41 +0100
committerBjørn Erik Pedersen <[email protected]>2021-11-16 20:42:34 +0100
commit2e70f61fb04cea08ef6598728a57637ae2cc199c (patch)
tree8e975b19634eacf3dbfb5197e5ff1b2be7fb3040 /hugofs
parent1ed8069a3a592dbbd493778a9637fb13727f4c61 (diff)
downloadhugo-2e70f61fb04cea08ef6598728a57637ae2cc199c.tar.gz
hugo-2e70f61fb04cea08ef6598728a57637ae2cc199c.zip
Fix content dir resolution when main project is a Hugo Module
Fixes #9177
Diffstat (limited to 'hugofs')
-rw-r--r--hugofs/fileinfo.go1
-rw-r--r--hugofs/rootmapping_fs.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/hugofs/fileinfo.go b/hugofs/fileinfo.go
index ea6ac4fd3..0a958a0c5 100644
--- a/hugofs/fileinfo.go
+++ b/hugofs/fileinfo.go
@@ -64,6 +64,7 @@ type FileMeta struct {
IsOrdered bool
IsSymlink bool
IsRootFile bool
+ IsProject bool
Watch bool
Classifier files.ContentClass
diff --git a/hugofs/rootmapping_fs.go b/hugofs/rootmapping_fs.go
index bd10144ff..9fdce3ad7 100644
--- a/hugofs/rootmapping_fs.go
+++ b/hugofs/rootmapping_fs.go
@@ -62,6 +62,7 @@ func NewRootMappingFs(fs afero.Fs, rms ...RootMapping) (*RootMappingFs, error) {
rm.Meta.BaseDir = rm.ToBasedir
rm.Meta.MountRoot = rm.path
rm.Meta.Module = rm.Module
+ rm.Meta.IsProject = rm.IsProject
meta := rm.Meta.Copy()
@@ -118,6 +119,7 @@ type RootMapping struct {
To string // The source directory or file.
ToBasedir string // The base of To. May be empty if an absolute path was provided.
Module string // The module path/ID.
+ IsProject bool // Whether this is a mount in the main project.
Meta *FileMeta // File metadata (lang etc.)
fi FileMetaInfo