Skip to main content

Canonical's custom Sphinx roles.

Project description

sphinx-roles

sphinx-roles houses the literalref, spellexception, and none roles.

Basic usage

literalref

To add a monospaced reference to your document, pass the target or URL to the literalref role:

:literalref:`link text <ref-target>`

:literalref:`link text <https://example.com>`

spellexception

To exempt a string from spell checking, wrap it in the spellexception role:

:spellexception:`Lorem ipsum`

none

To prevent a string from being rendered in the document, wrap it in the none role:

:none:`This text isn't rendered.`

Project setup

sphinx-roles is published on PyPI and can be installed with:

pip install sphinx-roles

After adding sphinx-roles to your Python project, update your Sphinx's conf.py file to include sphinx_roles as an extension:

extensions = [
    "sphinx_roles"
]

Community and support

You can report any issues or bugs on the project's GitHub repository.

sphinx-roles is covered by the Ubuntu Code of Conduct.

License and copyright

sphinx-roles is released under the GPL-3.0 license.

© 2025 Canonical Ltd.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_roles-0.1.0.tar.gz (91.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_roles-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_roles-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_roles-0.1.0.tar.gz
  • Upload date:
  • Size: 91.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_roles-0.1.0.tar.gz
Algorithm Hash digest
SHA256 702f93ed46635a304e479d27f82545333c074d4b1ab7ceb4ea84ffcba623c122
MD5 9c76d2cb611ad8a737ee2a147a91a581
BLAKE2b-256 7f95bbcd86b95a7a73421ccfe420912af9ec09611aec6b13a1fa8210ee10161b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_roles-0.1.0.tar.gz:

Publisher: release-publish.yaml on canonical/sphinx-roles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_roles-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_roles-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_roles-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04c28100bb428802e8a6a85e0601352bcbee3c6f4f18c6b323e7e46a39ae9a78
MD5 ad2314507d22a042917eee10fbbf2a0c
BLAKE2b-256 f0dbaea6fe8991bd0e7cc7440bda038eae86098a77a0066ff2d2f12b8b0887f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_roles-0.1.0-py3-none-any.whl:

Publisher: release-publish.yaml on canonical/sphinx-roles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page