Detect html lang attribute based on locale

This commit is contained in:
Ivanq 2021-04-01 21:12:19 +03:00
parent 1548138c50
commit 238b4e9cef
1 changed files with 21 additions and 0 deletions

21
_layouts/default.html Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
{%- assign lang = page.locale | split: "_" | first -%}
<html lang="{{ lang | default: page.lang | default: site.lang | default: "en" }}">
{%- include head.html -%}
<body>
{%- include header.html -%}
<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>
{%- include footer.html -%}
</body>
</html>