aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-03-12 08:18:23 -0700
committerBjørn Erik Pedersen <[email protected]>2024-03-13 17:34:42 +0200
commitdc6a292133bf3249f1741a7624075b0782b16f84 (patch)
treeee11263c7a02b7f68e33185851511c08bb14c843 /config
parent4f92f949eaf8c9827a758b3caadc672e0335480b (diff)
downloadhugo-dc6a292133bf3249f1741a7624075b0782b16f84.tar.gz
hugo-dc6a292133bf3249f1741a7624075b0782b16f84.zip
common/hugo: Rename IsMultiHost and IsMultiLingual
hugo.IsMultiHost => hugo.IsMultihost hugo.IsMultiLingual => hugo.IsMultilingual Closes #12232
Diffstat (limited to 'config')
-rw-r--r--config/allconfig/allconfig.go8
-rw-r--r--config/allconfig/configlanguage.go4
-rw-r--r--config/configProvider.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go
index 9cafc876e..590f2ba60 100644
--- a/config/allconfig/allconfig.go
+++ b/config/allconfig/allconfig.go
@@ -826,7 +826,7 @@ func fromLoadConfigResult(fs afero.Fs, logger loggers.Logger, res config.LoadCon
langConfigMap := make(map[string]*Config)
languagesConfig := cfg.GetStringMap("languages")
- var isMultiHost bool
+ var isMultihost bool
if err := all.CompileConfig(logger); err != nil {
return nil, err
@@ -863,7 +863,7 @@ func fromLoadConfigResult(fs afero.Fs, logger loggers.Logger, res config.LoadCon
}
if kk == "baseurl" {
// baseURL configure don the language level is a multihost setup.
- isMultiHost = true
+ isMultihost = true
}
mergedConfig.Set(kk, vv)
rootv := cfg.Get(kk)
@@ -913,7 +913,7 @@ func fromLoadConfigResult(fs afero.Fs, logger loggers.Logger, res config.LoadCon
}
// Adjust Goldmark config defaults for multilingual, single-host sites.
- if len(languagesConfig) > 1 && !isMultiHost && !clone.Markup.Goldmark.DuplicateResourceFiles {
+ if len(languagesConfig) > 1 && !isMultihost && !clone.Markup.Goldmark.DuplicateResourceFiles {
if !clone.Markup.Goldmark.DuplicateResourceFiles {
if clone.Markup.Goldmark.RenderHooks.Link.EnableDefault == nil {
clone.Markup.Goldmark.RenderHooks.Link.EnableDefault = types.NewBool(true)
@@ -943,7 +943,7 @@ func fromLoadConfigResult(fs afero.Fs, logger loggers.Logger, res config.LoadCon
Base: all,
LanguageConfigMap: langConfigMap,
LoadingInfo: res,
- IsMultihost: isMultiHost,
+ IsMultihost: isMultihost,
}
return cm, nil
diff --git a/config/allconfig/configlanguage.go b/config/allconfig/configlanguage.go
index 9971be65f..900db75ce 100644
--- a/config/allconfig/configlanguage.go
+++ b/config/allconfig/configlanguage.go
@@ -52,7 +52,7 @@ func (c ConfigLanguage) LanguagePrefix() string {
return c.Language().Lang
}
- if !c.IsMultiLingual() || c.DefaultContentLanguage() == c.Language().Lang {
+ if !c.IsMultilingual() || c.DefaultContentLanguage() == c.Language().Lang {
return ""
}
return c.Language().Lang
@@ -78,7 +78,7 @@ func (c ConfigLanguage) FastRenderMode() bool {
return c.config.Internal.FastRenderMode
}
-func (c ConfigLanguage) IsMultiLingual() bool {
+func (c ConfigLanguage) IsMultilingual() bool {
return len(c.m.Languages) > 1
}
diff --git a/config/configProvider.go b/config/configProvider.go
index 586a9b758..8f74202ab 100644
--- a/config/configProvider.go
+++ b/config/configProvider.go
@@ -35,7 +35,7 @@ type AllProvider interface {
PathParser() *paths.PathParser
Environment() string
IsMultihost() bool
- IsMultiLingual() bool
+ IsMultilingual() bool
NoBuildLock() bool
BaseConfig() BaseConfig
Dirs() CommonDirs