# Hugo Module imported mount appears as 'null'

**URL:** <https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297>\
**Category:** support\
**Tags:** modules\
**Created:** [April 21, 2022, 1:16pm UTC](https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297 "2022-04-21T13:16:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martijn\_Visser](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/martijn_visser/32/16767_2.png) [@Martijn\_Visser](https://discourse.gohugo.io/u/Martijn_Visser)\
**Post date:** [April 21, 2022, 1:16pm UTC](https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297/1 "2022-04-21T13:16:34Z")

</div>

Hi everyone,

As part of our open source project, we’re currently working on moving some of the code in our repository to their own dedicated repository. That also means that our documentation is impacted, since all this is currently all in one repository and we want to move the relevant pieces of documentation also to that dedicated repository.

That being said, we currently have all our documentation hosted in one repository. You can find this at [flink/docs at master · apache/flink · GitHub](https://github.com/apache/flink/tree/master/docs).

I’m currently doing an experiment to move out 4 documentation files from this repo to its own repository. You can find this at [GitHub - MartijnVisser/flink-connector-elasticsearch at copy-docs-experiment](https://github.com/MartijnVisser/flink-connector-elasticsearch/tree/copy-docs-experiment). Those files are:

1. content/docs/connectors/datastream/elasticsearch.md
2. content/docs/connectors/table/elasticsearch.md
3. content.zh/docs/connectors/datastream/elasticsearch.md
4. content.zh/docs/connectors/table/elasticsearch.md

However, we still want to be able able to build all documentation as it was generated in one repository. I think Hugo Modules would be the best way to go, but I’m running into an issue where the mount returns ‘null’ as value instead of a proper result.

So what I’ve done is the following:

1. Configure the main repo as a module by running `hugo mod init github.com/apache/flink`
2. Added a module by running `hugo mod get -u github.com/MartijnVisser/flink-connector-elasticsearch@copy-docs-experiment` (since this is on a specific branch)
3. I’ve expanded our config.toml with:

```auto
[module]
[[module.imports]]
  path = 'github.com/MartijnVisser/flink-connector-elasticsearch'
[[module.imports.mounts]]
  source = 'content'
  target = 'content'

```

1. However, when I now run `hugo config mounts`, this is what’s being reported:

```auto
{
   "path": "github.com/MartijnVisser/flink-connector-elasticsearch",
   "version": "v0.0.0-20220421085604-595f9464c12a",
   "time": "2022-04-21T08:56:04Z",
   "owner": "github.com/apache/flink",
   "dir": "/var/folders/vy/p3hq5hts1wlbs4ycpxj82p5r0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!martijn!visser/flink-connector-elasticsearch@v0.0.0-20220421085604-595f9464c12a/",
   "mounts": null
}

```

As you can see, the mounts is reported as null. I’m suspecting that’s why I haven’t been able yet to get the Hugo Module properly working. What am I doing wrong?

I’m running hugo v0.97.3+extended darwin/amd64 BuildDate=unknown

Thanks in advance for the help.

Best regards, Martijn

---

<div class="post-metadata">

**Author:** ![IanMadd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ianmadd/32/9452_2.png) [@IanMadd](https://discourse.gohugo.io/u/IanMadd)\
**Post date:** [April 21, 2022, 2:20pm UTC](https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297/2 "2022-04-21T14:20:16Z")

</div>

I think your problem is the import path. I think it should be:

```auto
path = 'github.com/MartijnVisser/flink-connector-elasticsearch/docs'

```

And then add a go.mod file in the `docs` directory with:

```auto
module github.com/MartijnVisser/flink-connector-elasticsearch/docs

go <version of go you're using> 

```

Try that and see if it gets you anywhere.

---

<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 21, 2022, 2:32pm UTC](https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297/3 "2022-04-21T14:32:26Z")

</div>

@IanMadd is right, if you want to split a repo into multiple submodules, each sub folder (module) need its own go.mod file.

You can avoid creating go.mod files by just using the root:

```auto
 [module]
[[module.imports]]
  path = 'github.com/MartijnVisser/flink-connector-elasticsearch'
[[module.imports.mounts]]
source = 'docs/content'
target = 'content'

```

Etc.

---

<div class="post-metadata">

**Author:** ![Martijn\_Visser](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/martijn_visser/32/16767_2.png) [@Martijn\_Visser](https://discourse.gohugo.io/u/Martijn_Visser)\
**Post date:** [April 26, 2022, 6:57am UTC](https://discourse.gohugo.io/t/hugo-module-imported-mount-appears-as-null/38297/4 "2022-04-26T06:57:35Z")

</div>

Thanks to the help of you both I’ve been able to fix it. Many thanks again for your support.
