Skip to content

Commit 7be2d47

Browse files
committed
fix: Improve CSS and JavaScript referencing in header.html for Sphinx compatibility
1 parent 4d8bafc commit 7be2d47

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • source/_templates/sphinx_minoo_theme/includes

source/_templates/sphinx_minoo_theme/includes/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
{% endif %}
2626

2727
{% for cssfile in css_files %}
28-
<link rel="stylesheet" href="{{ pathto(cssfile.filename, 1) }}" type="text/css" />
28+
<link rel="stylesheet" href="{{ pathto(cssfile.filename if cssfile.filename is defined else cssfile, 1) }}" type="text/css" />
2929
{% endfor %}
3030
{% for cssfile in extra_css_files %}
31-
<link rel="stylesheet" href="{{ pathto(cssfile.filename, 1) }}" type="text/css" />
31+
<link rel="stylesheet" href="{{ pathto(cssfile.filename if cssfile.filename is defined else cssfile, 1) }}" type="text/css" />
3232
{% endfor %}
3333

3434
<link rel="stylesheet" type=text/css href="{{ pathto('_static/font-awesome.min.css', 1) }}">
@@ -83,7 +83,7 @@
8383
{% set script_files = script_files + ['_static/searchtools.js'] %}
8484

8585
{%- for scriptfile in script_files %}
86-
<script type="text/javascript" src="{{ pathto(scriptfile.filename, 1) }}"></script>
86+
<script type="text/javascript" src="{{ pathto(scriptfile.filename if scriptfile.filename is defined else scriptfile, 1) }}"></script>
8787
{%- endfor %}
8888
{% endif %}
8989

0 commit comments

Comments
 (0)