Skip to content

Commit 965fa03

Browse files
author
Jonathan Visser
committed
Merge changes from sphinx8 into docsearch
1 parent bdeb606 commit 965fa03

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

docs/_templates/layout.html

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,22 @@
2828
{%- endblock -%}
2929

3030
{#- CSS #}
31-
{%- if sphinx_version_info < (4, 0) -%}
32-
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
33-
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
34-
{%- endif %}
35-
{%- if theme_analytics_id %}
36-
<link rel="stylesheet" href="{{ pathto('_static/cookieconsent.css', 1) }}" type="text/css" />
37-
{%- endif %}
38-
{%- for css in css_files %}
39-
{%- if css|attr("rel") %}
40-
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
31+
{%- for css_file in css_files %}
32+
{%- if css_file|attr("filename") %}
33+
{{ css_tag(css_file) }}
4134
{%- else %}
42-
{%- if css.filename.startswith('https://') %}
43-
<link rel="stylesheet" href="{{ css.filename }}" type="text/css" />
44-
{%- else %}
45-
<link rel="stylesheet" href="{{ pathto(css.filename, 1) }}" type="text/css" />
46-
{%- endif %}
35+
<link rel="stylesheet" href="{{ pathto(css_file, 1)|escape }}" type="text/css" />
4736
{%- endif %}
4837
{%- endfor %}
49-
{%- for cssfile in extra_css_files %}
50-
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
38+
39+
{#
40+
"extra_css_files" is an undocumented Read the Docs theme specific option.
41+
There is no need to check for ``|attr("filename")`` here because it's always a string.
42+
Note that this option should be removed in favor of regular ``html_css_files``:
43+
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files
44+
#}
45+
{%- for css_file in extra_css_files %}
46+
<link rel="stylesheet" href="{{ pathto(css_file, 1)|escape }}" type="text/css" />
5147
{%- endfor -%}
5248

5349
{#- FAVICON #}

requirements/base.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ sphinx_rtd_theme==3.0.2
44
myst-parser==4.0.1
55
mdit-py-plugins
66
sphinx-copybutton==0.5.2
7-
mdformat==0.7.18
7+
mdformat==0.7.22
88
mdformat-myst==0.2.1
9-
mdformat-frontmatter==0.4.1
9+
mdformat-frontmatter==2.0.8
1010
sphinx-notfound-page==1.1.0
11-
sphinx-sitemap==2.6.0
11+
sphinx-sitemap==2.8.0
1212
sphinx-docsearch
13-
GitPython==3.1.44
14-
ruamel.yaml==0.18.12
13+
GitPython==3.1.45
14+
ruamel.yaml==0.18.15
1515

1616
# hypernode/ requirements
1717
beautifulsoup4==4.11.1
1818
markdownify==0.11.2
1919
python-slugify==6.1.2
2020
pyyaml==5.1
21-
frontmatter==3.0.7
21+
frontmatter==3.0.8

0 commit comments

Comments
 (0)