From 6d821518f166479152a759c5bfcb88dfb81b0914 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Tue, 1 Mar 2022 03:14:17 +0100 Subject: [PATCH] Fix: correct custom CSS URL for I18N pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit problem description: When using the i18n_subsites plugin – which is somehow supported by this theme – the SITEURL is modified for all but the default language, causing the construction {{ SITEURL }}/{{ CUSTOM_CSS }} to change as well. This in principle affects all such template constructions where SITEURL is prepended to a custom loading path. One exception is {{ THEME_STATIC_DIR }}, which is adjusted by the i18n_subsites code to still match for translations. solution: The i18n plugin introduces an additional context variable {{ main_siteurl }}, which always points at the original unmodified SITEURL. As unfortunately this variable is not present in non-i18n sites, it's existence is checked first, taking SITEURL as a fallback. This special handling is acceptable IMHO, as at first glance I could not find any other affected URLs in templates. follow-up to #192 --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index fca8d45..9e311e7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -78,7 +78,7 @@ {% if CUSTOM_CSS %} - + {% endif %} {% if FEED_ALL_ATOM %}