Skip to main content

sphinx-query-param-ref

A Sphinx extension that adds the ability to create references with attached URL query parameters.

Installation

Install via pip:

pip install sphinx-query-param-ref

or from source for the latest development version:

git clone https://github.com/peytondmurray/sphinx-query-param-ref
cd sphinx-query-param-ref
pip install .

Usage

First, activate the extension by adding it to the list of extensions:

# conf.py

extensions = [
    "sphinx-query-param-ref",
]

This will add a new directive which adds references with URL query parameters to an RST document:

.. query-param-ref:: project/examples
    :parameters: ?tags=fancy
    :ref-type: doc
    :classes: custom-link-class-name

    A fancy custom ref!

This node will resolve to a link to the project/examples document, but with ?tags=fancy appended to the URL. The classes parameter is optional, but will add any custom html classes to the link that you want. The actual output of the snippet above will be

<div class="query-param-ref-wrapper">
    <a href="<whatever the reference to project/examples is resolved to>?tags=fancy">A fancy custom ref!</a>
</div>

Documentation

The query-param-ref has three parameters, all of them optional:

  • parameters: The string to append to the end of the ref URL.
  • classes: A space-separated list of HTML classes to attach to the <a> element.
  • ref-type: Type of reference this is; can be any, ref, doc, or myst.

Metadata

Release files for sphinx-query-param-ref 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-query-param-ref 0.0.1
File Size Uploaded Provenance
sphinx_query_param_ref-0.0.1.tar.gz 4.7 kB Without provenance Details

Release files / sphinx_query_param_ref-0.0.1.tar.gz

Download URL sphinx_query_param_ref-0.0.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d03907bfab00d23c0335a3ef4a3997cc8a82a4ab99470c1e5a0de1c32a4196bc
BLAKE2b-256 checksum
How to use checksums
278adb21adce190db5e19f32836048518843645cb9a21809ba204c37d9fa22c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Security for sphinx-query-param-ref 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page