1. Kay-Uwe (Kiwi) Lorenz
  2. sphinxcontrib-domaintools

Overview

Domain Tools

This Sphinx extension provides a tool for easy sphinx domain creation.

Installation

pip install sphinxcontrib-domaintools

Usage

In this example there is created a simple domain for GNU Make:

from sphinxcontrib.domaintools import custom_domain

def setup(app):
    app.add_domain(custom_domain('GnuMakeDomain',
        name  = 'make',
        label = "GNU Make",

        elements = dict(
            target = dict(
                objname      = "Make Target",
                indextemplate = "pair: %s; Make Target",
            ),
            var   = dict(
                objname = "Make Variable",
                indextemplate = "pair: %s; Make Variable"
            ),
        )))

Complete example you find in `sphinxcontrib.makedomain`_ package.

A more complex example you can find in sphinxcontrib-cmakedomain package.

Reference

License

New BSD License.