summaryrefslogtreecommitdiffstats
path: root/common/hugo/hugo.go
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2024-03-09 11:21:46 -0800
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-03-10 10:47:51 +0200
commit4f92f949eaf8c9827a758b3caadc672e0335480b (patch)
treeb3e43a708cc4703697c4108d7c1798345874da8f /common/hugo/hugo.go
parentd24ffdde5b34cb848d04db7099f9bf8903099209 (diff)
hugolib: Deprecate .Site.MultiLingual in favor of hugo.IsMultiLingual
Closes #12224
Diffstat (limited to 'common/hugo/hugo.go')
-rw-r--r--common/hugo/hugo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go
index 4ead647b8..a3d1a7bfc 100644
--- a/common/hugo/hugo.go
+++ b/common/hugo/hugo.go
@@ -116,12 +116,18 @@ func (i HugoInfo) IsMultiHost() bool {
return i.conf.IsMultihost()
}
+// IsMultiLingual reports whether there are two or more configured languages.
+func (i HugoInfo) IsMultiLingual() bool {
+ return i.conf.IsMultiLingual()
+}
+
// ConfigProvider represents the config options that are relevant for HugoInfo.
type ConfigProvider interface {
Environment() string
Running() bool
WorkingDir() string
IsMultihost() bool
+ IsMultiLingual() bool
}
// NewInfo creates a new Hugo Info object.