Use sphinx.ext.extlinks to generate frequently used links

Documentation see here:
http://sphinx-doc.org/ext/extlinks.html
This commit is contained in:
Stefan Tatschner
2015-05-29 23:08:17 +02:00
parent 6ad32bfe1b
commit 385c46fd4b
4 changed files with 15 additions and 9 deletions
+11 -1
View File
@@ -28,7 +28,10 @@ import os
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.todo']
extensions = [
'sphinx.ext.todo',
'sphinx.ext.extlinks',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -96,6 +99,13 @@ pygments_style = 'sphinx'
# Show .. todo:: block.
todo_include_todos = True
# Configure external links.
extlinks = {
'issue': ('https://github.com/syncthing/syncthing/issues/%s', 'issue #'),
'user': ('https://github.com/%s', '@'),
'commit': ('https://github.com/syncthing/syncthing/commit/%s', ''),
}
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for