Skip to content

Commit

Permalink
[CI] Address Hugo deprecation warning: use hugo.IsMultilingual (#4962)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Aug 5, 2024
1 parent b011f3c commit a0c6897
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions layouts/partials/i18n/fallback-page.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{{/*

Returns the fallback page of this page, if it has one.
A fallback page, is a page in the default site language
that has been mounted under this locale as a fallback
when this locale is missing a translation.
Returns the fallback page of this page, if it has one. A fallback page is a
page in the default site language that has been mounted under this locale as a
fallback when this locale is missing a translation.

*/ -}}

{{ $result := false -}}

{{ if and .Site.IsMultiLingual .File -}}
{{ if and hugo.IsMultilingual .File -}}
{{ $defaultLang := .Site.Sites.Default.Language.Lang -}}

{{ $resultsArray := where .Translations "Lang" $defaultLang -}}
Expand Down

0 comments on commit a0c6897

Please sign in to comment.