diff options
Diffstat (limited to 'modules/config.go')
-rw-r--r-- | modules/config.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/config.go b/modules/config.go index 62e6f5e4c..a50845df3 100644 --- a/modules/config.go +++ b/modules/config.go @@ -235,6 +235,17 @@ type Config struct { Private string } +// hasModuleImport reports whether the project config have one or more +// modules imports, e.g. github.com/bep/myshortcodes. +func (c Config) hasModuleImport() bool { + for _, imp := range c.Imports { + if isProbablyModule(imp.Path) { + return true + } + } + return false +} + // HugoVersion holds Hugo binary version requirements for a module. type HugoVersion struct { // The minimum Hugo version that this module works with. |