mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
@@ -101,6 +101,12 @@ ignoreImports {{< new-in "0.80.0" >}}
|
|||||||
disable
|
disable
|
||||||
: Set to `true` to disable the module while keeping any version info in the `go.*` files.
|
: Set to `true` to disable the module while keeping any version info in the `go.*` files.
|
||||||
|
|
||||||
|
noMounts {{< new-in "0.84.2" >}}
|
||||||
|
: Do not mount any folder in this import.
|
||||||
|
|
||||||
|
noVendor
|
||||||
|
: Never vendor this import (only allowed in main project).
|
||||||
|
|
||||||
{{< gomodules-info >}}
|
{{< gomodules-info >}}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -354,6 +354,11 @@ func (c *collector) addAndRecurse(owner *moduleAdapter, disabled bool) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *collector) applyMounts(moduleImport Import, mod *moduleAdapter) error {
|
func (c *collector) applyMounts(moduleImport Import, mod *moduleAdapter) error {
|
||||||
|
if moduleImport.NoMounts {
|
||||||
|
mod.mounts = nil
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
mounts := moduleImport.Mounts
|
mounts := moduleImport.Mounts
|
||||||
|
|
||||||
modConfig := mod.Config()
|
modConfig := mod.Config()
|
||||||
|
@@ -367,6 +367,7 @@ type Import struct {
|
|||||||
pathProjectReplaced bool // Set when Path is replaced in project config.
|
pathProjectReplaced bool // Set when Path is replaced in project config.
|
||||||
IgnoreConfig bool // Ignore any config in config.toml (will still folow imports).
|
IgnoreConfig bool // Ignore any config in config.toml (will still folow imports).
|
||||||
IgnoreImports bool // Do not follow any configured imports.
|
IgnoreImports bool // Do not follow any configured imports.
|
||||||
|
NoMounts bool // Do not mount any folder in this import.
|
||||||
NoVendor bool // Never vendor this import (only allowed in main project).
|
NoVendor bool // Never vendor this import (only allowed in main project).
|
||||||
Disable bool // Turn off this module.
|
Disable bool // Turn off this module.
|
||||||
Mounts []Mount
|
Mounts []Mount
|
||||||
|
Reference in New Issue
Block a user