-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MultiLingual and MultiHost methods/functions
- Deprecate .Site.MultiLingual in favor of hugo.IsMultilingual - Rename hugo.IsMultiHost to hugo.IsMultihost. Cannot deprecate in documentation because they have the same published path, but this shouldn't be a problem because hugo.IsMultiHost was introduced in the last patch release. See gohugoio/hugo#12232
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: hugo.IsMultilingual | ||
description: Reports whether there are two or more configured languages. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /functions/hugo/IsMultihost | ||
returnType: bool | ||
signatures: [hugo.IsMultilingual] | ||
--- | ||
|
||
{{< new-in v0.124.0 >}} | ||
|
||
Site configuration: | ||
|
||
{{< code-toggle file=hugo >}} | ||
defaultContentLanguage = 'de' | ||
defaultContentLanguageInSubdir = true | ||
[languages] | ||
[languages.de] | ||
languageCode = 'de-DE' | ||
languageName = 'Deutsch' | ||
title = 'Projekt Dokumentation' | ||
weight = 1 | ||
[languages.en] | ||
languageCode = 'en-US' | ||
languageName = 'English' | ||
title = 'Project Documentation' | ||
weight = 2 | ||
{{< /code-toggle >}} | ||
|
||
Template: | ||
|
||
```go-html-template | ||
{{ hugo.IsMultilingual }} → true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters