Sphinx 9.1.0 is the current version packaged on Archlinux.
The error message
File "/home/user/src/h11/docs/source/conf.py", line 61, in setup
app.add_javascript("show-code.js")
^^^^^^^^^^^^^^^^^^
AttributeError: 'Sphinx' object has no attribute 'add_javascript'
The following change fixes the problem
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b3627f5..8eb6864 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -58,9 +58,9 @@ extensions = [
# Undocumented trick: if we def setup here in conf.py, it gets called just
# like an extension's setup function.
def setup(app):
- app.add_javascript("show-code.js")
- app.add_javascript("facebox.js")
- app.add_stylesheet("facebox.css")
+ app.add_js_file("show-code.js")
+ app.add_js_file("facebox.js")
+ app.add_css_file("facebox.css")
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Sphinx 9.1.0 is the current version packaged on Archlinux.
The error message
The following change fixes the problem