schlenk / sphinxcontrib-globalsubs

Sphinx global substitutions extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sphinx Global Substitutions Extension

This extension adds support for global substitutions to conf.py. One of the main use cases are central abbreviation lists, but any valid reST markup can be substituted.

Installation

Just install via pip:

$ pip install sphinxcontrib-globalsubs

Then add the module sphinxcontrib.globalsubs to the extensions list in your conf.py.

Usage

Add global substitutions via the global_substitutions dictionary in your conf.py:

global_substitutions = {
    'sub': 'substitution',
    'tla': ':abbr:`TLA (Three Letter Acronym)`',
    'img': '.. image:: img.png'
}

Global substitutions are processed after default substitutions like |release|, |version| and |today|, but before any other substitutions in source files (i.e. global substitutions can be overriden).

About

Sphinx global substitutions extension

License:Other


Languages

Language:Python 100.0%