return i.deps
}
+// IsMultiHost reports whether each configured language has a unique baseURL.
+func (i HugoInfo) IsMultiHost() bool {
+ return i.conf.IsMultihost()
+}
+
// ConfigProvider represents the config options that are relevant for HugoInfo.
type ConfigProvider interface {
Environment() string
Running() bool
WorkingDir() string
+ IsMultihost() bool
}
// NewInfo creates a new Hugo Info object.
environment string
running bool
workingDir string
+ multihost bool
}
func (c testConfig) Environment() string {
func (c testConfig) WorkingDir() string {
return c.workingDir
}
+
+func (c testConfig) IsMultihost() bool {
+ return c.multihost
+}
environment string
running bool
workingDir string
+ multihost bool
}
func (c testConfig) Environment() string {
return c.workingDir
}
+func (c testConfig) IsMultihost() bool {
+ return c.multihost
+}
+
func TestIsGlobWithExtension(t *testing.T) {
c := qt.New(t)
--- /dev/null
+hugo
+
+stdout 'IsMultiHost: true'
+
+-- hugo.toml --
+title = "Hugo IsMultiHost Test"
+[languages.en]
+baseURL = "https://example.org"
+[languages.zh]
+baseURL = "https://zh.example.org"
+
+-- layouts/index.html --
+{{ warnf "IsMultiHost: %v" hugo.IsMultiHost }}