From 6494e4b3415ed908b1088bb51147ef40d878630f Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 7 Jun 2022 17:55:25 +0100 Subject: [PATCH] Add language and tags --- _layouts/base.html | 19 +++++++++++++++++++ index.html | 1 + 2 files changed, 20 insertions(+) diff --git a/_layouts/base.html b/_layouts/base.html index 6e02eee..72ef1c0 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -3,7 +3,15 @@ layout: compress --- + +{% assign pathsplit = page.url | split: '/' %} +{% assign language = pathsplit[1] %} +{% assign language_info = site.data.languages | where: "code", language %} +{% if language_info %} + +{% else %} +{% endif %} {% if page.homepage %}{% else %}{{ page.title }} - {% endif %}Minetest Modding Book @@ -13,6 +21,17 @@ layout: compress + + + {% assign oldSegment = "/" | append: language | append: "/" %} + {% for other_lang in site.data.languages %} + {% unless other_lang.code == language %} + {% assign newSegment = "/" | append: other_lang.code | append: "/" %} + + + {% endunless %} + {% endfor %} + diff --git a/index.html b/index.html index f6a1ef4..181283a 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,7 @@ --- layout: none --- + Redirecting...