dox_util
0.1.0

User Documentation

  • extlinks
  • linkcheck
  • rule
  • source
  • toctree
  • todo
  • weak

Appendix

  • Changelog
dox_util
  • »
  • extlinks
  • Released

extlinks

The sphinx.ext.extlinks third party extension provides base paths for external links. These base paths are set up once in conf.py and can be used from the rst files.

With dox_util it is possible to specify relative paths based on the root of the documentation (in the Makefile usually called SOURCE).

Example:

html

conf.py / rst

Accenture careers.

See also ../../../../other/some/folder.

See also other doc.

# conf.py

extensions = [
    ...
    'sphinx.ext.extlinks',
    'dox_util'
]

extlinks = {'website'    ('https://accenture.com/%s', None),
            'other_doc': ('../../other/%s', None)}

# RST file

Accenture :website:`careers <careers>`.

See also :other_doc:`some/folder`.

See also :other_doc:`other doc <some/folder>`.

It’s a good practice to use the replace directive provided by Sphinx.

Example:

html

rst

Accenture careers.

# very readable text
Accenture |careers|.

# usually defined at the bottom of the document
.. |careers| replace:: :website:`careers <careers>`

© Copyright 2024 Accenture.

Documentation from 2024-10-23 16:49:36, official build.
Based on https://github.com/esrlabs/dox, folder dox_util, from 2024-10-23 12:35:49, commit 162e706.

View page source