Make lang attribute configurable

This commit is contained in:
Cotes Chung 2020-05-23 17:06:36 +08:00
parent 7382eaa953
commit a64d00c1e6

View file

@ -9,13 +9,19 @@ layout: compress
<!DOCTYPE html>
{% if site.lang %}
{% assign lang = site.lang | split: "_" | first %}
{% else %}
{% assign lang = 'en' %}
{% endif %}
{% capture prefer_mode %}
{% if site.theme_mode != "dual" %}
mode="{{ site.theme_mode }}"
{% endif %}
{% endcapture %}
<html lang="en" {{ prefer_mode }} >
<html lang="{{ lang }}" {{ prefer_mode }} >
{% include head.html %}