# Nested hugo module

**URL:** https://discourse.gohugo.io/t/nested-hugo-module/21384
**Category:** support
**Created:** [October 22, 2019, 4:18pm UTC](https://discourse.gohugo.io/t/nested-hugo-module/21384 "2019-10-22T16:18:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alberto](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@alberto](https://discourse.gohugo.io/u/alberto)
#### Post date: [October 22, 2019, 4:18pm UTC](https://discourse.gohugo.io/t/nested-hugo-module/21384/1 "2019-10-22T16:18:57Z")

</div>

I have a repo with some not-Hugo-related go modules (i.e., `go.mod`/`go.sum` in the root) and a Hugo site which is **not** in the root (it’s located at `assets/site/`). I want to take my custom Hugo theme out of that repo and use it as a Hugo module (just like what you’re doing in [hugoDocs](https://github.com/gohugoio/hugoDocs) / [gohugoioTheme](https://github.com/gohugoio/gohugoioTheme)).

I managed to have it working creating a nested `go.mod`/`go.sum` in the Hugo directory (`assets/site/`). I wasn’t able to make it work including the theme in the already existing root `go.mod`/`go.sum`. Can you tell me what’s the right approach here? Is it possible to have a single `go.mod`/`go.sum` in my main directory or the nested `go.mod`/`go.sum` is the way to go?
