Make it work with relative URL
This commit is contained in:
parent
2e91cf3d78
commit
d5ac713d16
@ -47,7 +47,7 @@ to add the following in your `<head>` tag:
|
|||||||
{% if article %}
|
{% if article %}
|
||||||
{% if article.styles %}
|
{% if article.styles %}
|
||||||
{% for style in article.styles %}
|
{% for style in article.styles %}
|
||||||
{{ style }}
|
{{ style|format(SITEURL) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -65,7 +65,7 @@ So, in the template I use for my blog now looks like the following:
|
|||||||
{% if article %}
|
{% if article %}
|
||||||
{% if article.styles %}
|
{% if article.styles %}
|
||||||
{% for style in article.styles %}
|
{% for style in article.styles %}
|
||||||
{{ style }}
|
{{ style|format(SITEURL) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -45,10 +45,7 @@ def format_css(gen, metastring, formatter):
|
|||||||
List of formatted strings
|
List of formatted strings
|
||||||
"""
|
"""
|
||||||
metalist = metastring.replace(' ', '').split(',')
|
metalist = metastring.replace(' ', '').split(',')
|
||||||
if gen.settings['RELATIVE_URLS']:
|
site_url = '%s'
|
||||||
site_url = '..'
|
|
||||||
else:
|
|
||||||
site_url = gen.settings['SITEURL']
|
|
||||||
return [formatter.format(site_url, x) for x in metalist]
|
return [formatter.format(site_url, x) for x in metalist]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user