# Use modules to share content folder between sites

**URL:** <https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397>\
**Category:** support\
**Created:** [April 28, 2022, 7:39pm UTC](https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397 "2022-04-28T19:39:35Z")\
**Posts on this page:** 4\
**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:** [April 28, 2022, 7:39pm UTC](https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397/1 "2022-04-28T19:39:35Z")

</div>

Hi all,  
I have a few sites made with Hugo and wanted to know if it was possible for these sites to share content between them? So I have a few sites that have blogs and wanted one of my sites to post all blog entries from my all of my other sites.

I looked at Hugo mounts for that, but since I don’t use Github can Hugo modules work with local paths if the site folders are in the root of my web folder?

So I wanted to know if I can mount one site importing content folders from two sites.

I hope I made sense.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [April 28, 2022, 7:49pm UTC](https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397/2 "2022-04-28T19:49:32Z")

</div>

> [@Emma](#):
>
> I looked at Hugo mounts for that, but since I don’t use Github can Hugo modules work with local paths if the site folders are in the root of my web folder?

Yes, you can mount local paths. There are only a few restrictions:

- Only the main project can use paths outside of the project directory (e.g. absolute paths) and symlinks.
- For themes/theme components, the folders to mount must live relative to the theme root.

So, if you had this folder structure:

```bash
sites
├── myblogcontent
├── site1
└── site2

```

You could do this in site1 and site2:

```toml
[module]
[[module.mounts]]
  source = '../myblogcontent'
  target = 'content/blog'

```

A footnote: Hugo Modules also support other Git providers (e.g. GitLab).

---

<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:** [April 28, 2022, 7:51pm UTC](https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397/3 "2022-04-28T19:51:15Z")

</div>

Thank you so much for your quick reply! I had no idea I could use local paths so will try that. Also noted what you mention regarding some restrictions. Thank you for the amazing work @bep

---

<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:** [April 30, 2022, 7:51pm UTC](https://discourse.gohugo.io/t/use-modules-to-share-content-folder-between-sites/38397/4 "2022-04-30T19:51:47Z")

</div>

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