sphinx-doc/sphinx

Incomplete documentation for add_js_file() and add_css_file()

Open

#12,223 opened on Apr 2, 2024

View on GitHub
 (3 comments) (2 reactions) (0 assignees)Python (5,625 stars) (1,985 forks)batch import
easygood first issuehelp wantedsprinttype:bugtype:docs

Description

Describe the bug

  • The examples do not include the CRC32 checksums added in #11415
  • There should be a "changed in version 7.1" mentioning those checksums (https://www.sphinx-doc.org/en/master/changes.html#release-7-1-0-released-jul-24-2023)
  • There should be a hint how JS/CSS files can be copied to the _static directory (see also https://github.com/sphinx-doc/sphinx/issues/11173#issuecomment-1496483665)
  • It might also be helpful to mention that site authors (as opposed to extension developers) can use the config values html_js_files and html_css_files in combination with html_static_path?
  • Maybe it could even be mentioned that files specified by extensions can be overridden by site authors by simply putting a file with the same name into their html_static_path (which currently doesn't fully work: #12096)?

How to Reproduce

Look at https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_js_file and https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_css_file.

Contributor guide