I'm extending the basic theme from sphinx-doc and I notice the following code chunk inside basic theme layout.html
script
macro
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
Does that mean I can add a html_theme_options
like the following inside my theme.conf
:
[options]
script_files =
and inside my conf.py
, I add:
html_theme_options = {'script_files': '_static'}
However, with this set, the build is totally messed up and produced junk pages like:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>...</head>
<body>
-->
<!-- my js code but is automatically commented out-->
</body>
</html>
Which part goes wrong? What should I do in order to load my own customized javascript? Thanks much!