# Using Hugo modules only in theme

**URL:** https://discourse.gohugo.io/t/using-hugo-modules-only-in-theme/49155
**Category:** support
**Tags:** modules
**Created:** [April 3, 2024, 12:43pm UTC](https://discourse.gohugo.io/t/using-hugo-modules-only-in-theme/49155 "2024-04-03T12:43:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tiroyo](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@tiroyo](https://discourse.gohugo.io/u/tiroyo)
#### Post date: [April 3, 2024, 12:43pm UTC](https://discourse.gohugo.io/t/using-hugo-modules-only-in-theme/49155/1 "2024-04-03T12:43:27Z")

</div>

Hello,

Is it possible to use Hugo modules only in theme and not in the project such keeping the `go.mod` file in theme?

```auto
# NewHugoSite/themes/a-theme/config/_default/module.yaml
- NewHugoSite
  |- themes
  | |- a-theme
  | |- go.mod
  | |- config
  | |- _default
  | |- module.yaml

# instead of having to use it like this: NewHugoSite/config/_default/module.yaml
- NewHugoSite
  |- config
  | |- _default
  | |- module.yaml
  |- themes
  |- go.mod

```

Thanks
