hugo.IsMultihost
Syntax
hugo.IsMultihost
Returns
bool
Site configuration:
hugo.
defaultContentLanguage: de
defaultContentLanguageInSubdir: true
languages:
de:
baseURL: https://de.example.org/
languageCode: de-DE
languageName: Deutsch
title: Projekt Dokumentation
weight: 1
en:
baseURL: https://en.example.org/
languageCode: en-US
languageName: English
title: Project Documentation
weight: 2
defaultContentLanguage = 'de'
defaultContentLanguageInSubdir = true
[languages]
[languages.de]
baseURL = 'https://de.example.org/'
languageCode = 'de-DE'
languageName = 'Deutsch'
title = 'Projekt Dokumentation'
weight = 1
[languages.en]
baseURL = 'https://en.example.org/'
languageCode = 'en-US'
languageName = 'English'
title = 'Project Documentation'
weight = 2
{
"defaultContentLanguage": "de",
"defaultContentLanguageInSubdir": true,
"languages": {
"de": {
"baseURL": "https://de.example.org/",
"languageCode": "de-DE",
"languageName": "Deutsch",
"title": "Projekt Dokumentation",
"weight": 1
},
"en": {
"baseURL": "https://en.example.org/",
"languageCode": "en-US",
"languageName": "English",
"title": "Project Documentation",
"weight": 2
}
}
}
Template:
{{ hugo.IsMultihost }} → true