Add docs-linkcheck to test links 26/15226/1
authorThanh Ha <zxiiro@gmail.com>
Mon, 8 Apr 2019 03:29:32 +0000 (11:29 +0800)
committerThanh Ha <zxiiro@gmail.com>
Mon, 8 Apr 2019 03:32:18 +0000 (11:32 +0800)
Change-Id: I83e718791c22311be0d96dd9137308a79c9fd14a
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
docs/conf.py
docs/install.rst
tox.ini

index 0607d9e..0d3ab61 100644 (file)
@@ -21,3 +21,8 @@ from docs_conf.conf import *
 
 version=str(VersionInfo('lfdocs-conf'))
 release=str(VersionInfo('lfdocs-conf'))
+
+linkcheck_ignore = [
+    # The '#' in the path makes sphinx think it's an anchor
+    'https://gerrit.linuxfoundation.org/infra/#/admin/projects/releng/docs-conf',
+]
index 7116460..e58749f 100644 (file)
@@ -55,10 +55,10 @@ Follow these steps to install lfdocs-conf:
    project.
 
    The first line ".. _my-project:" is a special Sphinx `cross-ref
-   <http://www.sphinx-doc.org/en/stable/markup/inline.html#ref-role>`_ which
-   is useful to allow other projects to link to arbitrary locations in your
-   project. Create these for every section heading in your project to ensure
-   that others can link to your project.
+   <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role>`_
+   which is useful to allow other projects to link to arbitrary locations in
+   your project. Create these for every section heading in your project to
+   ensure that others can link to your project.
 
    .. note::
 
diff --git a/tox.ini b/tox.ini
index bc6dc04..ab77912 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -4,6 +4,7 @@ envlist =
     check-hooks,
     coala,
     docs,
+    docs-linkcheck,
     py27
 
 [testenv]
@@ -37,6 +38,12 @@ deps = -rdocs/requirements.txt
 commands =
     sphinx-build -j auto --keep-going -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
 
+[testenv:docs-linkcheck]
+deps = -rdocs/requirements.txt
+commands =
+    sphinx-build -j auto --keep-going -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+
 [testenv:reno]
 deps = -rdocs/requirements.txt
 commands = reno {posargs:--help}