summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2016-05-06 17:16:37 +0200
committerJan Dittberner <jandd@cacert.org>2016-05-06 17:16:37 +0200
commit2435bcbd6e798de4b004e96dbfec0fdeb7c241c7 (patch)
tree43e1046b388ac968c67493f4c6769e8b22a3a690 /docs
parentdb79888a742a8e9c899be6eb69fb216cf3f23271 (diff)
downloadcacert-infradocs-2435bcbd6e798de4b004e96dbfec0fdeb7c241c7.tar.gz
cacert-infradocs-2435bcbd6e798de4b004e96dbfec0fdeb7c241c7.tar.xz
cacert-infradocs-2435bcbd6e798de4b004e96dbfec0fdeb7c241c7.zip
Replace custom wiki role with extlinks extension
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/conf.py b/docs/conf.py
index d213f04..c2a57d5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -32,6 +32,7 @@ sys.path.insert(0, os.path.abspath('.'))
# ones.
extensions = [
'sphinx.ext.todo',
+ 'sphinx.ext.extlinks',
'jandd.sphinxext.ip',
'jandd.sphinxext.mac',
]
@@ -363,6 +364,11 @@ epub_exclude_files = ['search.html']
#epub_use_index = True
+extlinks = {
+ 'wiki': ('https://wiki.cacert.org/%s', 'Wiki '),
+}
+
+
def cacert_bug(name, rawtext, text, lineno, inliner, options={}, content=[]):
try:
bugnum = int(text)
@@ -380,13 +386,5 @@ def cacert_bug(name, rawtext, text, lineno, inliner, options={}, content=[]):
return [node], []
-def cacert_wiki(name, rawtext, text, lineno, inliner, options={}, content=[]):
- ref = urljoin('https://wiki.cacert.org/', text)
- node = nodes.reference(rawtext, "Wiki " + utils.unescape(text),
- refuri=ref, **options)
- return [node], []
-
-
def setup(app):
app.add_role('bug', cacert_bug)
- app.add_role('wiki', cacert_wiki)