theme: remove special cases for LanguageCode #861

This commit is contained in:
Sören Weber 2024-05-28 22:34:58 +02:00
parent b0c38a6257
commit 58815765c5
No known key found for this signature in database
GPG Key ID: BEC6D55545451B6D
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
{{- partialCached "page-meta.hugo" . .RelPermalink }} {{- partialCached "page-meta.hugo" . .RelPermalink }}
{{- $outputFormat := partial "output-format.hugo" . }} {{- $outputFormat := partial "output-format.hugo" . }}
<html lang="{{ .Page.Language.LanguageCode | default "en" }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article"> <html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
<head> <head>
{{- partial "meta.html" . }} {{- partial "meta.html" . }}
{{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }} {{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}

View File

@ -14,7 +14,7 @@
{{- if .Site.Params.description }} {{- if .Site.Params.description }}
{{- warnf "UNSUPPORTED usage of 'params.description' config parameter found, move it to the frontmatter of your home page; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }} {{- warnf "UNSUPPORTED usage of 'params.description' config parameter found, move it to the frontmatter of your home page; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }}
{{- end }} {{- end }}
<html lang="{{ .Page.Language.LanguageCode | default "en" }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article"> <html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
<head> <head>
{{- partial "meta.html" . }} {{- partial "meta.html" . }}
{{- $page := . }} {{- $page := . }}

View File

@ -19,7 +19,7 @@
<meta property="og:description" content="{{ . }}"> <meta property="og:description" content="{{ . }}">
{{- end }} {{- end }}
{{- with or .Params.locale site.Language.LanguageCode }} {{- with site.Language.LanguageCode }}
<meta property="og:locale" content="{{ . }}"> <meta property="og:locale" content="{{ . }}">
{{- end }} {{- end }}