Skip to content

Commit d34b71b

Browse files
authored
Use css_tag helper to inject CSS files (#1519)
* Use `css_tag` helper to inject CSS files * Typo
1 parent 4874e94 commit d34b71b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sphinx_rtd_theme/layout.html

+2-6
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@
2929
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
3030
{%- endif %}
3131
{%- for css in css_files %}
32-
{%- if css|attr("rel") %}
33-
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
34-
{%- else %}
35-
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
36-
{%- endif %}
32+
{{ css_tag(css) }}
3733
{%- endfor %}
3834

3935
{%- for cssfile in extra_css_files %}
40-
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
36+
{{ css_tag(cssfile) }}
4137
{%- endfor -%}
4238

4339
{#- FAVICON

0 commit comments

Comments
 (0)