I’m trying to launch the exampleSite (so that I can construct my site building from that code) and I’m getting this error: Error: module "coHub" not found; either add it as a Hugo Module or store it in "/Users/jamesades/jva/themes/coHub/exampleSite/themes"
I return to the root of my project (jva) and run the code hugo mod init but I get Error: failed to init modules: binary with name "go" not found
. I created a submodule called coHub, but coHub was also saved under themes. I’ve tried running the exampleSite from both, but I receive that same error warning.
I would think that I should be able to cd into exampleSite and run hugo server. Clearly, I’m missing an important point.
I’ve searched for an answer, and this is what comes closest, but I don’t think it’s really dealing with my issue.
Thanks, so I downloaded go, but I’m still having trouble initializing a Hugo module…if I’m using the code hugo mod init github.com/<your_user>/<your_project>, is <your_user> the user name of git and then <your_project> the root of the project (jva). I’ve tried that and I’ve also tried the username of my computer, neither seems to work.
Okay, so this is my root project (is that what you mean by repository?). I’ve only used git to try to connect git to Netlify to ultimately host my webpage. But yeah, for now, just trying to view the example website (exampleSite), so that I can then alter the code to create my own website accordingly (with the coHub theme: GitHub - StaticMania/hugo-cohub).
Okay, took some time to get everything sorted with Git since they are no longer allowing terminal logins, so here is my git repo: GitHub - Jades1/netlify
Second, I still have no idea why you are referring to Go modules, unless it is in your project (not the theme)—and you have not provided access to your project. https://github.com/Jades1/netlify is not a project; I’m not sure what it is.
Third, this works fine:
hugo new site foo
cd foo
git init
git clone --recurse-submodules https://github.com/StaticMania/hugo-cohub themes/cohub
echo "theme = 'cohub'" >> config.toml
cd themes/cohub/exampleSite/
hugo server --theme ../..
Okay, thanks for the link. Will only provide link to repository in the future.
I thought the project was public and therefore anyone had access. (Sorry, I’m very knowledgable about github, though I do plan on learning more).
Yes, that did work fine. Thank you very much for that code. I was just using hugo server rather than hugo server --theme ../... I’ve been playing around with the example site and it is quite amazing!