# Include content from another folder?

**URL:** <https://discourse.gohugo.io/t/include-content-from-another-folder/38866>\
**Category:** support\
**Created:** [May 30, 2022, 8:52pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866 "2022-05-30T20:52:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/emma/32/6684_2.png) [@Emma](https://discourse.gohugo.io/u/Emma)\
**Post date:** [May 30, 2022, 8:52pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/1 "2022-05-30T20:52:04Z")

</div>

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?

Thanks in advance for any help/advice.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 30, 2022, 9:06pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/2 "2022-05-30T21:06:16Z")

</div>

In site1, mount the content directory (or a specific subdirectory) from site2:

```auto
[[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'

```

Don’t forget to include the default mount.

[https://gohugo.io/hugo-modules/configuration/#module-config-mounts](https://gohugo.io/hugo-modules/configuration/#module-config-mounts)

---

<div class="post-metadata">

**Author:** ![Emma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/emma/32/6684_2.png) [@Emma](https://discourse.gohugo.io/u/Emma)\
**Post date:** [June 2, 2022, 7:44pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/3 "2022-06-02T19:44:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [June 2, 2022, 7:57pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/4 "2022-06-02T19:57:02Z")

</div>

> [@Emma](#):
>
> From what I understand partials are not part of the modules system.

This is incorrect.

You can do this:

```toml
[[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'

```

---

<div class="post-metadata">

**Author:** ![Emma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/emma/32/6684_2.png) [@Emma](https://discourse.gohugo.io/u/Emma)\
**Post date:** [June 3, 2022, 7:55pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/5 "2022-06-03T19:55:27Z")

</div>

Many thanks @jmooring I’ll give it a try )

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [June 5, 2022, 7:56pm UTC](https://discourse.gohugo.io/t/include-content-from-another-folder/38866/6 "2022-06-05T19:56:12Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
