mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
e58a540895
commit
a8c221d33b
1 changed files with 9 additions and 0 deletions
|
@ -282,6 +282,15 @@ func (c *Client) Vendor() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Include the config directory if present.
|
||||||
|
configDir := filepath.Join(dir, "config")
|
||||||
|
_, err = c.fs.Stat(configDir)
|
||||||
|
if err == nil {
|
||||||
|
if err := hugio.CopyDir(c.fs, configDir, filepath.Join(vendorDir, t.Path(), "config"), nil); err != nil {
|
||||||
|
return errors.Wrap(err, "failed to copy config dir to vendor dir")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Also include any theme.toml or config.* files in the root.
|
// Also include any theme.toml or config.* files in the root.
|
||||||
configFiles, _ := afero.Glob(c.fs, filepath.Join(dir, "config.*"))
|
configFiles, _ := afero.Glob(c.fs, filepath.Join(dir, "config.*"))
|
||||||
configFiles = append(configFiles, filepath.Join(dir, "theme.toml"))
|
configFiles = append(configFiles, filepath.Join(dir, "theme.toml"))
|
||||||
|
|
Loading…
Reference in a new issue