When I’m trying to create the public files, I get this error on fresh vex-hugo installation.
➜ exampleSite (master) ✗ hugo
Total in 11 ms
Error: module "vex-hugo" not found; either add it as a Hugo Module or store it in "/Users/houmie/projects/vex-hugo/exampleSite/themes".: module does not exist
What am I missing please?
The theme is not found. The console gives detailed instructions:
add it as a Hugo Module or store it in “/Users/houmie/projects/vex-hugo/exampleSite/themes”
Also see the Doc on Hugo Modules | Hugo
Fair point. When I’m running it like this:
hugo server --themesDir ../..
it works. So I need somehow to pass this along to Hugo when generating the public files.
I read the bit that you linked and find this confusing. Why should I pass on the path to a Github project, if the module is already locally available?
path = "github.com/spf13/hyde"
I experimented like this:
path = "/Users/houmie/projects/vex-hugo/exampleSite"
But it still doesn’t work.
So I ended up doing this:
hugo --themesDir ../..
and now it works.
P.S. if there is a way I could set this up better in the config, I’m happy to learn that approach. Thanks
themesDir = "../.." is the relevant parameter that can be used in the
See here for an example.
Yes, this is it. Now it’s super simple, I can just run
I’m surprised vex-hugo makers don’t add
themesDir = "../.." by default to config.toml.
Well technically this is not correct.
The recommended way would be for you to organize your Hugo project in its own folder and place the theme undes
/themes/vex-hugo/ or mount it as a module.
You are not really supposed to deploy from within an
exampleSite folder (it can be done as you found out, but better stick with the recommended workflows as described in the Hugo Docs, especially since it seems that you only recently started out using Hugo).
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.