From d5ac713d163600da535aacf6780a1d18dc8461f3 Mon Sep 17 00:00:00 2001 From: Jorge Maldonado Ventura Date: Wed, 15 Feb 2017 14:02:03 +0100 Subject: [PATCH] Make it work with relative URL --- README.markdown | 4 ++-- custom_css.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index 84d69f0..be01476 100644 --- a/README.markdown +++ b/README.markdown @@ -47,7 +47,7 @@ to add the following in your `` tag: {% if article %} {% if article.styles %} {% for style in article.styles %} -{{ style }} + {{ style|format(SITEURL) }} {% endfor %} {% endif %} {% endif %} @@ -65,7 +65,7 @@ So, in the template I use for my blog now looks like the following: {% if article %} {% if article.styles %} {% for style in article.styles %} - {{ style }} + {{ style|format(SITEURL) }} {% endfor %} {% endif %} {% endif %} diff --git a/custom_css.py b/custom_css.py index c85aba8..2cc940d 100644 --- a/custom_css.py +++ b/custom_css.py @@ -45,10 +45,7 @@ def format_css(gen, metastring, formatter): List of formatted strings """ metalist = metastring.replace(' ', '').split(',') - if gen.settings['RELATIVE_URLS']: - site_url = '..' - else: - site_url = gen.settings['SITEURL'] + site_url = '%s' return [formatter.format(site_url, x) for x in metalist]