Skip to content

Commit

Permalink
alex-shpak#408, alex-shpak#410: Use LanguageCode in templates if spec…
Browse files Browse the repository at this point in the history
…ified
  • Loading branch information
alex-shpak committed Jan 13, 2022
1 parent fb0863a commit 3a65df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
<html lang="{{ default .Site.Language.Lang .Site.LanguageCode }}" dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
<head>
{{ partial "docs/html-head" . }}
{{ partial "docs/inject/head" . }}
</head>
<body dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
<input type="checkbox" class="hidden toggle" id="menu-control" />
<input type="checkbox" class="hidden toggle" id="toc-control" />
<main class="container flex">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/html-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">

{{- range .Translations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
<link rel="alternate" hreflang="{{ default .Language.Lang .Site.LanguageCode }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
{{- end -}}

<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
Expand Down

0 comments on commit 3a65df3

Please sign in to comment.