From a64d00c1e63dc8b2430acd44477831ae4c5bf620 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 23 May 2020 17:06:36 +0800 Subject: [PATCH] Make lang attribute configurable --- _layouts/default.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index a92a798..e0740cc 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -9,13 +9,19 @@ layout: compress +{% 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 %} - + {% include head.html %}