Merge pull request #2866 from EricGusmao/fix/hugo-v0.158.0-deprecations
fix: migrate deprecated Hugo v0.158.0 language API
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
disabled = false
|
disabled = false
|
||||||
languageCode = "en"
|
locale = "en"
|
||||||
languageName = "English"
|
label = "English"
|
||||||
weight = 1
|
weight = 1
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "de"
|
locale = "de"
|
||||||
languageName = "Deutsch"
|
label = "Deutsch"
|
||||||
weight = 3
|
weight = 3
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "en"
|
locale = "en"
|
||||||
languageName = "English"
|
label = "English"
|
||||||
weight = 1
|
weight = 1
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "es"
|
locale = "es"
|
||||||
languageName = "Español"
|
label = "Español"
|
||||||
weight = 6
|
weight = 6
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "fr"
|
locale = "fr"
|
||||||
languageName = "Français"
|
label = "Français"
|
||||||
weight = 2
|
weight = 2
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "it"
|
locale = "it"
|
||||||
languageName = "Italiano"
|
label = "Italiano"
|
||||||
weight = 4
|
weight = 4
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "ja"
|
locale = "ja"
|
||||||
languageName = "日本語"
|
label = "日本語"
|
||||||
weight = 8
|
weight = 8
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "pt-br"
|
locale = "pt-br"
|
||||||
languageName = "Português (Brasil)"
|
label = "Português (Brasil)"
|
||||||
weight = 6
|
weight = 6
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "pt-pt"
|
locale = "pt-pt"
|
||||||
languageName = "Português (Portugal)"
|
label = "Português (Portugal)"
|
||||||
weight = 5
|
weight = 5
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
languageCode = "zh-cn"
|
locale = "zh-cn"
|
||||||
languageName = "简体中文"
|
label = "简体中文"
|
||||||
weight = 9
|
weight = 9
|
||||||
title = "Blowfish"
|
title = "Blowfish"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
lang="{{ with site.Params.isoCode | default (site.LanguageCode | default `en`) }}{{- . -}}{{ end }}"
|
lang="{{ with site.Params.isoCode | default (site.Language.Locale | default `en`) }}{{- . -}}{{ end }}"
|
||||||
dir="{{ cond (site.Params.rtl | default false) `rtl` `ltr` }}"
|
dir="{{ cond (site.Params.rtl | default false) `rtl` `ltr` }}"
|
||||||
class="scroll-smooth"
|
class="scroll-smooth"
|
||||||
data-default-appearance="{{ site.Params.defaultAppearance | default `light` }}"
|
data-default-appearance="{{ site.Params.defaultAppearance | default `light` }}"
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $finalLink := $taxonomyLink }}
|
{{ $finalLink := $taxonomyLink }}
|
||||||
{{ $currentLang := site.Language.Lang }}
|
{{ $currentLang := site.Language.Name }}
|
||||||
{{ if eq site.LanguagePrefix "" }}
|
{{ if eq site.LanguagePrefix "" }}
|
||||||
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
{{ with .Site.Language.Params.htmlCode | default .Site.LanguageCode }}
|
{{ with .Site.Language.Params.htmlCode | default .Site.Language.Locale }}
|
||||||
<meta http-equiv="content-language" content="{{ . }}">
|
<meta http-equiv="content-language" content="{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{{ with .File }}
|
{{ with .File }}
|
||||||
{{ $path := .Path }}
|
{{ $path := .Path }}
|
||||||
{{ range $translations }}
|
{{ range $translations }}
|
||||||
{{ $lang := print "." .Lang ".md" }}
|
{{ $lang := print "." .Language.Name ".md" }}
|
||||||
{{ $path = replace $path $lang ".md" }}
|
{{ $path = replace $path $lang ".md" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $id = delimit (slice "likes_" $path) "" }}
|
{{ $id = delimit (slice "likes_" $path) "" }}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{{ with .File }}
|
{{ with .File }}
|
||||||
{{ $path := .Path }}
|
{{ $path := .Path }}
|
||||||
{{ range $translations }}
|
{{ range $translations }}
|
||||||
{{ $lang := print "." .Lang ".md" }}
|
{{ $lang := print "." .Language.Name ".md" }}
|
||||||
{{ $path = replace $path $lang ".md" }}
|
{{ $path = replace $path $lang ".md" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $id = delimit (slice "views_" $path) "" }}
|
{{ $id = delimit (slice "views_" $path) "" }}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"@id": {{ site.Home.Permalink | safeURL }},
|
"@id": {{ site.Home.Permalink | safeURL }},
|
||||||
"name": "{{ .Site.Title | safeJS }}",
|
"name": "{{ .Site.Title | safeJS }}",
|
||||||
{{ with .Site.Params.description }}"description": "{{ . | safeJS }}",{{ end }}
|
{{ with .Site.Params.description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||||
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
|
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||||
"url": {{ site.Home.Permalink | safeURL }},
|
"url": {{ site.Home.Permalink | safeURL }},
|
||||||
{{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }}
|
{{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }}
|
||||||
"publisher" : {
|
"publisher" : {
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"name": "{{ .Title | safeJS }}",
|
"name": "{{ .Title | safeJS }}",
|
||||||
"headline": "{{ .Title | safeJS }}",
|
"headline": "{{ .Title | safeJS }}",
|
||||||
{{ with .Description }}"description": "{{ . | safeJS }}",{{ end }}
|
{{ with .Description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||||
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
|
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||||
"url" : {{ .Permalink }},
|
"url" : {{ .Permalink }},
|
||||||
"author" : {
|
"author" : {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
|
|||||||
Reference in New Issue
Block a user