Add languagecode fallback to site language

This commit is contained in:
Will Faught
2022-12-16 16:14:07 -08:00
parent 7af0a557a5
commit e9e390cfb4

View File

@@ -1,5 +1,7 @@
<!doctype html>
<html{{ if eq .Language.LanguageDirection "rtl" }} dir="rtl"{{ end }} lang="{{ .Site.LanguageCode }}">
{{ $rtl := eq .Language.LanguageDirection "rtl" }}
{{ $lang := .Site.LanguageCode | default .Site.Language.Lang }}
<html{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}>
{{ partial "paige-head.html" . }}
<body class="d-flex flex-column">
<div class="container flex-fill">