URI: 
       modules: Add module.import.noMounts config - hugo - [fork] hugo port for 9front
  HTML git clone git@git.drkhsh.at/hugo.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 40dfdd09521bcb8f56150e6791d60445198f27ab
   DIR parent 3a6dc6d3f423c4acb79ef21b5a76e616fa2c9477
  HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Mon, 28 Jun 2021 10:39:52 +0200
       
       modules: Add module.import.noMounts config
       
       Fixes #8708
       
       Diffstat:
         M docs/content/en/hugo-modules/confi… |       6 ++++++
         M modules/collect.go                  |       5 +++++
         M modules/config.go                   |       1 +
       
       3 files changed, 12 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/docs/content/en/hugo-modules/configuration.md b/docs/content/en/hugo-modules/configuration.md
       @@ -101,6 +101,12 @@ ignoreImports {{< new-in "0.80.0" >}}
        disable
        : 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 >}}
        
        
   DIR diff --git a/modules/collect.go b/modules/collect.go
       @@ -354,6 +354,11 @@ func (c *collector) addAndRecurse(owner *moduleAdapter, disabled bool) error {
        }
        
        func (c *collector) applyMounts(moduleImport Import, mod *moduleAdapter) error {
       +        if moduleImport.NoMounts {
       +                mod.mounts = nil
       +                return nil
       +        }
       +
                mounts := moduleImport.Mounts
        
                modConfig := mod.Config()
   DIR diff --git a/modules/config.go b/modules/config.go
       @@ -367,6 +367,7 @@ type Import struct {
                pathProjectReplaced bool   // Set when Path is replaced in project config.
                IgnoreConfig        bool   // Ignore any config in config.toml (will still folow 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).
                Disable             bool   // Turn off this module.
                Mounts              []Mount