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 @@
|
||||
<head>
|
||||
<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="{{ . }}">
|
||||
{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $lang := print "." .Language.Name ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{ end }}
|
||||
{{ $id = delimit (slice "likes_" $path) "" }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $lang := print "." .Language.Name ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{ end }}
|
||||
{{ $id = delimit (slice "views_" $path) "" }}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"@id": {{ site.Home.Permalink | safeURL }},
|
||||
"name": "{{ .Site.Title | safeJS }}",
|
||||
{{ with .Site.Params.description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
|
||||
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||
"url": {{ site.Home.Permalink | safeURL }},
|
||||
{{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }}
|
||||
"publisher" : {
|
||||
@@ -25,7 +25,7 @@
|
||||
"name": "{{ .Title | safeJS }}",
|
||||
"headline": "{{ .Title | safeJS }}",
|
||||
{{ with .Description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
|
||||
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||
"url" : {{ .Permalink }},
|
||||
"author" : {
|
||||
"@type": "Person",
|
||||
|
||||
Reference in New Issue
Block a user