From 5be8fa347fd3430aa30ecb4522d8e3d46888af36 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 8 Apr 2013 23:36:37 +0200 Subject: [PATCH] docs: Add 'confval' object type to Sphinx --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 55f415b4..7f111014 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -266,3 +266,12 @@ latex_documents = [ needs_sphinx = '1.0' extlinks = {'issue': ('https://github.com/mopidy/mopidy/issues/%s', '#')} + + +def setup(app): + from sphinx.ext.autodoc import cut_lines + app.connect(b'autodoc-process-docstring', cut_lines(4, what=['module'])) + app.add_object_type( + b'confval', 'confval', + objname='configuration value', + indextemplate='pair: %s; configuration value')