summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-06-07 15:03:23 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-06-07 15:03:23 +0200
commit982b7ad783f0135af08700465f0ded1a4371000f (patch)
tree202075c63030bc9afb138be8c9143b41fe89de9a
parenta19d98ce7e590e6c7f82aa08f7e9791a72e2e8bc (diff)
downloadrabalderz-982b7ad783f0135af08700465f0ded1a4371000f.tar.gz
rabalderz-982b7ad783f0135af08700465f0ded1a4371000f.tar.bz2
rabalderz-982b7ad783f0135af08700465f0ded1a4371000f.zip
More i18n stuff, add links languages for index.
-rw-r--r--config.toml7
-rw-r--r--content/blog/_index.en.md2
-rw-r--r--templates/header.html2
-rw-r--r--templates/index.html8
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 @@
<header id="site-header" class="site-header">
<div class="site-title">{{ config.title }}</div>
- <div class="site-description">{{ config.description }}</div>
+ <div class="site-description">{{ trans(key="description", lang=lang) }}</div>
</header>
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 id="home-blurb">
{{ section.content | safe }}
</section>
+<section id="translations">
+ This page is also available in:
+ {% for l in section.translations %}
+ {% if l.lang != lang %}
+ <a href="{{ l.permalink | safe }}">{{ trans(key=l.lang) }}</a>
+ {% endif %}
+ {% endfor %}
+</section>
<section class="subsections">
{% for sub in section.subsections %}