././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1666103622.1317308 sphinxcontrib-jquery-4.1/AUTHORS0000644000000000000000000000015014323534506013564 0ustar00Maintainers =========== *Listed alphabetically in forename, surname order* * Adam Turner <@AA-Turner> ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1678805956.965478 sphinxcontrib-jquery-4.1/CHANGES.rst0000644000000000000000000000242614404105705014321 0ustar00Release 4.1 (14/03/2023) ========================== * Include ``tests/``, ``AUTHORS``, ``CHANGES.rst``, and ``LICENCE`` in the source distribution ('sdist') file. No changes to functionality. Release 4.0 (14/03/2023) ========================== * Enforcing `subresource integrity`_ (SRI) checks breaks loading rendered documentation from local filesystem (``file:///`` URIs). SRI checks may now be configured by the boolean configuration option ``jquery_use_sri``, which defaults to ``False``. See `sphinx_rtd_theme#1420`_ for further details. .. _sphinx_rtd_theme#1420: https://github.com/readthedocs/sphinx_rtd_theme/issues/1420 Release 3.0.0 (03/11/2022) ========================== * Vendor jQuery within the extension and copy the files to the documentation's ``_static`` directory. * Include the ``_sphinx_javascript_frameworks_compat.js`` compatibility file from Sphinx 5. * Include `subresource integrity`_ checksums in generated ``') in text assert ('') in text static_dir = out_dir / '_static' assert static_dir.joinpath('jquery.js').is_file() assert static_dir.joinpath('_sphinx_javascript_frameworks_compat.js').is_file() @pytest.mark.skipif(sphinx.version_info[:2] < (6, 0), reason="Requires Sphinx 6.0 or greater") def test_jquery_installed_sphinx_ge_60(blank_app): out_dir = blank_app(confoverrides={"extensions": ["sphinxcontrib.jquery"]}) text = out_dir.joinpath("index.html").read_text(encoding="utf-8") assert ('') in text assert ('') in text static_dir = out_dir / '_static' assert static_dir.joinpath('jquery.js').is_file() assert static_dir.joinpath('_sphinx_javascript_frameworks_compat.js').is_file() @pytest.mark.skipif(sphinx.version_info[:2] >= (6, 0), reason="Requires Sphinx older than 6.0") def test_jquery_installed_sphinx_lt_60(blank_app): out_dir = blank_app(confoverrides={"extensions": ["sphinxcontrib.jquery"]}) if sphinx.version_info[:2] >= (2, 0): text = out_dir.joinpath("index.html").read_text(encoding="utf-8") assert '' in text else: text = out_dir.joinpath("contents.html").read_text(encoding="utf-8") assert '' in text if sphinx.version_info[:1] == (5,): assert '' in text static_dir = out_dir / '_static' assert static_dir.joinpath('jquery.js').is_file() if sphinx.version_info[:1] == (5,): assert static_dir.joinpath('_sphinx_javascript_frameworks_compat.js').is_file() @pytest.mark.parametrize(('filename', 'integrity'), _FILES, ids=[*dict(_FILES)]) def test_integrity(filename, integrity): checksum = hashlib.sha384(Path(_ROOT_DIR, filename).read_bytes()) encoded = base64.b64encode(checksum.digest()).decode(encoding='ascii') assert f"sha384-{encoded}" == integrity sphinxcontrib-jquery-4.1/PKG-INFO0000644000000000000000000000507300000000000013556 0ustar00Metadata-Version: 2.1 Name: sphinxcontrib-jquery Version: 4.1 Summary: Extension to include jQuery on newer Sphinx releases Author: Adam Turner Requires-Python: >=2.7 Description-Content-Type: text/x-rst Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Framework :: Sphinx Classifier: Framework :: Sphinx :: Extension Classifier: Topic :: Documentation Classifier: Topic :: Documentation :: Sphinx Requires-Dist: Sphinx>=1.8 Project-URL: Repository, https://github.com/sphinx-contrib/jquery/ ====================== sphinxcontrib-jquery ====================== .. image:: https://img.shields.io/pypi/v/sphinxcontrib-jquery.svg :target: https://pypi.org/project/sphinxcontrib-jquery/ :alt: Package on PyPI ``sphinxcontrib-jquery`` ensures that jQuery is always installed for use in Sphinx themes or extensions. To use it, add ``sphinxcontrib.jquery`` as a Sphinx extension: .. code:: python # conf.py extensions = [ "sphinxcontrib.jquery", ] ... Configuration ------------- .. As this is a README, we restrict the directives we use to those which GitHub renders correctly. This means that we cannot use ``versionadded``, ``confval``, ``warning``, or other similar directives. We use a reStructuredText definition list to emulate the ``confval`` rendering. We use inline **bold** syntax as a poor-man's ``.. warning::`` directive. ``jquery_use_sri`` A boolean value controlling whether to enable `subresource integrity`_ (SRI) checks for JavaScript files that this extension loads. The default is ``False``. **Warning**: Enabling SRI checks may break documentation when loaded from local filesystem (``file:///`` URIs). *New in version 4.0.* .. _subresource integrity: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity