Skip to content

Commit

Permalink
Use css_tag helper to inject CSS files (#1519)
Browse files Browse the repository at this point in the history
* Use `css_tag` helper to inject CSS files

* Typo
  • Loading branch information
humitos committed Aug 29, 2023
1 parent 4874e94 commit d34b71b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sphinx_rtd_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- endif %}
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %}
{{ css_tag(css) }}
{%- endfor %}

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

{#- FAVICON
Expand Down

0 comments on commit d34b71b

Please sign in to comment.