mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Fix #1522: fix attribute error if css is str
This commit is contained in:
@@ -29,11 +29,19 @@
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
{%- endif %}
|
||||
{%- for css in css_files %}
|
||||
{{ css_tag(css) }}
|
||||
{% if css|attr("filename") -%}
|
||||
{{ css_tag(css) }}
|
||||
{%- else -%}
|
||||
<link rel="stylesheet" href="{{ pathto(css, 1)|escape }}" type="text/css" />
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{%- for cssfile in extra_css_files %}
|
||||
{{ css_tag(cssfile) }}
|
||||
{% if css|attr("filename") -%}
|
||||
{{ css_tag(css) }}
|
||||
{%- else -%}
|
||||
<link rel="stylesheet" href="{{ pathto(css, 1)|escape }}" type="text/css" />
|
||||
{%- endif %}
|
||||
{%- endfor -%}
|
||||
|
||||
{#- FAVICON
|
||||
|
||||
Reference in New Issue
Block a user