docs: theme: Use standard macros
Those macros align with the upstream macros from the "basic"
theme found at `sphinx/themes/basic/layout.html`. This will
make maintenance easer in the future and avoids a double
inclusion of css files.
{%- endmacro %}
{%- macro css() %}
- <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
- <link rel="stylesheet" href="{{ pathto('_static/css/site.css', 1) }}"/>
- {%- for cssfile in css_files %}
- <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
+ {%- for css in css_files %}
+ {%- if css|attr("filename") %}
+ {{ css_tag(css) }}
+ {%- else %}
+ <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
+ {%- endif %}
{%- endfor %}
{%- endmacro %}
{%- block htmltitle %}
<title>{{ title|striptags|e }}</title>
{%- endblock %}
- {{ css() }}
+ {%- block css %}
+ {{- css() }}
+ {%- endblock %}
{%- if not embedded %}
{{ script() }}
{%- if use_opensearch %}
