diff --git a/README.md b/README.md index 92ec877..9a1dd68 100644 --- a/README.md +++ b/README.md @@ -368,7 +368,7 @@ If something is missing for you, please open an issue. - [x] other strings in the templates - [x] localized RSS links - [ ] links to navigate between languages - - [ ] support generic default_language (not en by default) + - [x] support generic default_language (not en by default) - [ ] other - [x] ASCII banner does not overflow - [x] write setup/configuration guide diff --git a/config.toml b/config.toml index f5de316..bd3e56f 100644 --- a/config.toml +++ b/config.toml @@ -13,6 +13,7 @@ build_search_index = false generate_rss = true +# The default language for pages that don't have a language code default_language = "en" languages = [ @@ -23,8 +24,11 @@ languages = [ # The common part of the title (appended to page/section titles) title = " | dnsmanager" [extra.forge] +# The baseURL for files tracked on the forge browse = "https://tildegit.org/southerntofu/dnsmanager-website/src/branch/master/" +# Homepage of the forge home = "https://tildegit.org/" +# Name of the forge name = "tildegit" [translations] diff --git a/templates/index.html b/templates/index.html index 6df871b..c394ebb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,7 +1,7 @@ {% import "widgets.html" as widgets %} {% set lang = section.lang | default(value=page.lang) %} - + {% block title %}{{ section.title }}{% endblock %} diff --git a/templates/widgets.html b/templates/widgets.html index a91e0ba..3a9ac1e 100644 --- a/templates/widgets.html +++ b/templates/widgets.html @@ -34,7 +34,7 @@ a submenu. A submenu is an actual list {% endmacro menu %} {%- macro i18n_path(path) -%} - {% if lang == "en" %}{{ path }} + {% if lang == config.default_language %}{{ path }} {%- else -%} {%- set parts = path | split(pat=".md") -%} {%- for part in parts -%}