guzzle / guzzle_sphinx_theme

Sphinx theme used by Guzzle
MIT License
169 stars 60 forks source link

Deprecation warning about javascript #45

Open erikkemperman opened 5 years ago

erikkemperman commented 5 years ago

Hi,

I am getting deprecation warnings about javascript:

venv/lib/python3.7/site-packages/guzzle_sphinx_theme/guzzle_sphinx_theme/layout.html:198: RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead.

Sphinx version 2.0.1 Guzzle theme version 0.7.11

ronankeane commented 4 years ago

Hi.

I'm getting this warning too, just installed theme today. Do I need to be concerned? Thanks.

c:\python37\lib\site-packages\guzzle_sphinx_theme\guzzle_sphinx_theme\layout.html:198: RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead.

Sphinx Version 2.2.0

bruceravel commented 4 years ago

I am by no means a sphinx expert, so there might be repercussions to my suggestion.

I removed line 5 from the file guzzle_sphinx_theme/layout.html. This one:

  {% set script_files = script_files + ["_static/myscript.js"] %}

This appears to be using a soon-to-be-deprecated method of including js in your project. If you are not using a file explicitly called myscript.js in the _static/ folder, then removing that line seems to have no impact. And it gets rid of that warning.