summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorRobert Göhler <github@ghlr.de>2020-01-04 14:12:53 +0100
committerRobert Göhler <github@ghlr.de>2020-01-04 14:12:53 +0100
commit52595595f76d85b20477b61a886a9ff09f17e604 (patch)
treeb33d14410f79ee8c716f22bd765cf9722cd196cf /docs/conf.py
parent156eef177980052027db572e4b60d984626e0081 (diff)
parenta4fbdcf4b01c8a1806576bcd62a6f166b5645dc6 (diff)
downloadvyos-documentation-52595595f76d85b20477b61a886a9ff09f17e604.tar.gz
vyos-documentation-52595595f76d85b20477b61a886a9ff09f17e604.zip
Merge branch 'master' into newdirectives
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py13
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