jhvanderschee / jhvanderschee/hugobricks
Adding hugobricks as a hugo module isn't working
- Dominant language
- HTML
- Stars
- 156
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
I'm attempting to setup HugoBricks for the first time, but am trying to set it up as a Hugo Module as I've done with previous themes:
Step 1: Initiate my template hugo site as a module: `hugo mod init github.com//`. This creates the `go.mod` file.
Step 2: Add the hugobricks as a module: hugo mod get https://github.com/jhvanderschee/hugobricks
>> NOTE: This seemed to run correctly as it added `require github.com/jhvanderschee/hugobricks v0.0.0-20250410110442-4ebf9f845785 // indirect` to the `go.mod` file
Step 3: Add the theme module configuration into Hugo's `config.toml`:
```TOML
[module]
[[module.imports]]
path = "github.com/jhvanderschee/hugobricks"
```
Step 4: Tried both `hugo mod tidy` and `hugo mod get`, but I'm still getting an error message that Hugo can't import the theme as a module:
**Error: command error: failed to load modules: module "hugobricks" not found in "/Users/username/Git-Repos/hugo-template/themes/hugobricks"; either add it as a Hugo Module or store it in "/Users/username/Git-Repos/hugo-template/themes".: module does not exist**
Has anyone else seen this error and found a fix for it?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.