aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-07-08 12:25:53 +0200
committerBjørn Erik Pedersen <[email protected]>2023-07-08 16:08:46 +0200
commit0f921ace6f897ba63cdcce7a0ef59c9c615920bd (patch)
tree11c7d1138540e75d8a235539fe62bd568448f010 /modules
parent6019953769741d3ec0b48aa16b2a6cc06a93f5ba (diff)
downloadhugo-0f921ace6f897ba63cdcce7a0ef59c9c615920bd.tar.gz
hugo-0f921ace6f897ba63cdcce7a0ef59c9c615920bd.zip
Fix hugo mod vendor for modules with hugo.toml
Fixes #11221
Diffstat (limited to 'modules')
-rw-r--r--modules/client.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/client.go b/modules/client.go
index 5d8daf926..53ce67cb3 100644
--- a/modules/client.go
+++ b/modules/client.go
@@ -292,8 +292,10 @@ func (c *Client) Vendor() error {
}
}
- // Also include any theme.toml or config.* files in the root.
+ // Also include any theme.toml or config.* or hugo.* files in the root.
configFiles, _ := afero.Glob(c.fs, filepath.Join(dir, "config.*"))
+ configFiles2, _ := afero.Glob(c.fs, filepath.Join(dir, "hugo.*"))
+ configFiles = append(configFiles, configFiles2...)
configFiles = append(configFiles, filepath.Join(dir, "theme.toml"))
for _, configFile := range configFiles {
if err := hugio.CopyFile(c.fs, configFile, filepath.Join(vendorDir, t.Path(), filepath.Base(configFile))); err != nil {