Closed davidsneighbour closed 2 years ago
I am unable to reproduce the problem as described.
git clone --single-branch -b hugo-github-issue-9751 https://github.com/jmooring/hugo-testing hugo-github-issue-9751
cd hugo-github-issue-9751
hugo
hugo mod vendor
tree _vendor
config.toml is present in the _vendor directory.
Please try adding the module https://github.com/dnb-org/dnb-hugo-giscus which has the configuration in a config directory. Running hugo mod vendor
on a project using this module does not add the config directory. This might be related to config in the config directory only, as I don't have any module using config.toml currently...
Sample:
Before:
https://github.com/davidsneighbour/kollitsch.de/tree/39772071c929233b9d373533e7c7d9bcabb0fead
After hugo mod vendor
:
https://github.com/davidsneighbour/kollitsch.de/tree/test/vendoring
Confirmed. A module's "config" directory is not vendored.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Reading the documentation at https://gohugo.io/commands/hugo_mod_vendor/ I would assume that the process would copy over the configuration directory or file of the module too.
Currently, it appears, only directories that are explicitly mounted in the module-configuration are vendored with the addition of a package.json if it exists. The problem is, that the config directory can't be mounted and might contain information used in layouts or the module later on.
Is this by design or a bug?