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 09b7a958..d82f292c 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,5 +176,16 @@ 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 |