Hi all,
I wanted to know if there was a way of including content from another folder into my Hugo build. I have site1 and site2 but they will share a lot of the HTML, I managed to include my Scss from another file and both sites share styles but have not found a way to include content from one site to another.
So if I would have a file called about.html with a {{ .Title }} inside then allow both sites to include it making the title change depending on the site you’re on.
I take it partials only work in the folder they are in right?
In site1, mount the content directory (or a specific subdirectory) from site2:
[[module.mounts]] # This is the default mount
source = 'content'
target = 'content'
[[module.mounts]]
source = '../site2/content' # The path can be relative or absolute
target = 'content'
Thanks @jmooring for the reply and help, but I was wondering if I can a global partials folder that is share between sites. From what I understand partials are not part of the modules system.
[[module.mounts]] # This is the default mount
source = 'layouts'
target = 'layouts'
[[module.mounts]]
source = '../site2/layouts/partials' # The path can be relative or absolute
target = 'layouts/partials'