diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2024-03-09 11:21:46 -0800 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-03-10 10:47:51 +0200 |
commit | 4f92f949eaf8c9827a758b3caadc672e0335480b (patch) | |
tree | b3e43a708cc4703697c4108d7c1798345874da8f /common/hugo/hugo.go | |
parent | d24ffdde5b34cb848d04db7099f9bf8903099209 (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.go | 6 |
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. |