doc/user: use extlink for a common commit links
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 1 Aug 2018 07:12:38 +0000 (17:12 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 2 Aug 2018 01:22:11 +0000 (11:22 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doc/user/conf.py.in
doc/user/index.rst
doc/user/tapping.rst

index 8238eac..961bbef 100644 (file)
@@ -41,6 +41,7 @@ release = '@PROJECT_VERSION@'
 extensions = [
     'sphinx.ext.mathjax',
     'sphinx.ext.graphviz',
+    'sphinx.ext.extlinks',
 ]
 
 # Add any paths that contain templates here, relative to this directory.
@@ -168,3 +169,8 @@ from recommonmark.parser import CommonMarkParser
 source_parsers = {
     '.md': CommonMarkParser,
 }
+
+extlinks = { 'commit' :
+               ('https://gitlab.freedesktop.org/libinput/libinput/commit/%s',
+                       'git commit ')
+}
index 00bad42..d257df9 100644 (file)
@@ -68,5 +68,4 @@ file for the full license information.
 .....
 About
 .....
-Documentation generated from git commit
-`__GIT_VERSION__ <https://gitlab.freedesktop.org/libinput/libinput/commit/__GIT_VERSION__>`_
+Documentation generated from :commit:`__GIT_VERSION__`.
index 85fdc1a..afce206 100644 (file)
@@ -21,9 +21,8 @@ even though some hardware can distinguish between that many fingers.
 Tap-to-click default setting
 ------------------------------------------------------------------------------
 
-Tapping is **disabled** by default on most devices, see [this
-commit](https://gitlab.freedesktop.org/libinput/libinput/commit/2219c12c3aa45b80f235e761e87c17fb9ec70eae)
-because:
+Tapping is **disabled** by default on most devices, see
+:commit:`2219c12c3` because:
 
 - if you don't know that tapping is a thing (or enabled by default), you get
   spurious button events that make the desktop feel buggy.