If I do a hugo mod vendor from the theme directory I can see the partial in the _vendor sub-directory.
However, when I import the theme into my main project, the partial is not available. When running the Hugo server I’m getting the following error message.
...partial "jslibs/alpinejs/script-src.html" not found
If I do hugo mod vendor from my main project directory, the themes files are available but nothing from the sub-module.
Do the imported files from the theme not filter down to the main project?
I’ve read many articles on Hugo modules but can’t quite get this nested module working. Please can someone help clarify?
If I run hugo config mounts from the project that is using the theme I only see entries for my project and the theme module. There is no object in the output for the alpine module.
So I’m trying to add alpine to the head.html of my site via the theme if that makes sense. So rather than adding Alpine to each site I create, the theme will handle that import and pass its partials down.
Error message when running hugo server.
Failed to render pages: render of "home" failed: execute of template failed: template: index.html:3:8: executing "index.html" at <partial "head.html" .>: error calling partial: "/home/jim/projects/hugo/mytheme/layouts/partials/head.html:1:3": execute of template failed: template: partials/head.html:1:3: executing "partials/head.html" at <partialCached "jslibs/alpinejs/script-src.html" "-">: error calling partialCached: partial "jslibs/alpinejs/script-src.html" not found
We should double check that the documentation is clear about this (and we should probably warn about it if we can detect it), but the config directory is only read for the main project. Themes/theme modules is config.toml etc. only.