diff options
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index b5e67368..4c8989ef 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,8 @@ import os import sys sys.path.append(os.path.abspath("./_ext")) +from docutils import nodes, utils +from docutils.parsers.rst.roles import set_classes # -- Project information ----------------------------------------------------- @@ -174,6 +176,17 @@ texinfo_documents = [ 'Miscellaneous'), ] + +def vytask_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + app = inliner.document.settings.env.app + base = app.config.vyos_phabricator_url + ref = base + str(text) + set_classes(options) + node = nodes.reference( + rawtext, utils.unescape(str(text)), refuri=ref, **options) + return [node], [] + + def setup(app): pass #app.add_object_type('opcmd', 'opcmd') |