I run hugo v0.120.4.
I have the following mutlisite structure:
main-site/
config/
_default/
hugo.toml
content/
hugo.toml
static/
css/
sub-sites/
site-a/
content/
static/
images/
hugo.toml
site-b/
content/
static/
images/
hugo.toml
From the main-site
directory, I can successfully do hugo server --config=sub-sites/site-a/hugo.toml
.
I want to share theme, theme configuration and some custom css between the main-site
and the sub-sites site-a
and site-b
.
I’ve read:
- Configure Hugo modules | Hugo
- I’m not sure I understand whether or not the source path should be relative to
main-site
from therehugo
is run or relative to the site being built, for example relative tosite-a
.
- I’m not sure I understand whether or not the source path should be relative to
- Shared content between multiple sites
I want to mount main-site/css
as static/css
for site-a
.
In main-site/sub-sites/site-a/hugo-toml
I got the following:
[module]
[[module.mounts]]
source="sub-sites/site-a/content"
target="content"
[[module.mounts]]
source = "static"
target = "static"
The content directory gets correctly mounted, and here source is relative to main-site
.
For site-a
I cannot manage to mount main-site/static
as static
nor main-site/static/css
as static/css
. How can I do this?