From 982b7ad783f0135af08700465f0ded1a4371000f Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 7 Jun 2020 15:03:23 +0200 Subject: More i18n stuff, add links languages for index. --- config.toml | 7 ++++++- content/blog/_index.en.md | 2 +- templates/header.html | 2 +- templates/index.html | 8 ++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/config.toml b/config.toml index 458949f..38c9bd6 100644 --- a/config.toml +++ b/config.toml @@ -20,21 +20,26 @@ taxonomies = [ ] languages = [ - { code = "nb", feed = true }, { code = "en", feed = true }, ] default_language = "nb" [translations.nb] +description = "En blogg om samfunn, teknologi, internett, overvåkning og annet grums." moreprompt = "Les mer..." latest = "Siste innlegg:" allposts = "se alle innleggene i" +en = "English" +nb = "norsk" [translations.en] +description = "A blog about society, technology, internet, surveillance and other grievances." moreprompt = "More..." latest = "Latest posts:" allposts = "View all posts in" +en = "english" +nb = "Norsk" [extra] # Put all your custom variables here diff --git a/content/blog/_index.en.md b/content/blog/_index.en.md index 9166782..7628631 100644 --- a/content/blog/_index.en.md +++ b/content/blog/_index.en.md @@ -1,7 +1,7 @@ +++ title = "The Rabalder Blog" description = """ -A blog about society, technology, internet, durveillance and other grievances. +A blog about society, technology, internet, surveillance and other grievances. In this section I mostly write in Norwegian, but english posts can be found below. """ diff --git a/templates/header.html b/templates/header.html index 80e6eb5..ad0951f 100644 --- a/templates/header.html +++ b/templates/header.html @@ -1,4 +1,4 @@ diff --git a/templates/index.html b/templates/index.html index c932b7c..48857c4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,6 +4,14 @@
{{ section.content | safe }}
+
+ This page is also available in: + {% for l in section.translations %} + {% if l.lang != lang %} + {{ trans(key=l.lang) }} + {% endif %} + {% endfor %} +
{% for sub in section.subsections %} -- cgit v1.2.3