From: Thanh Ha Date: Mon, 8 Apr 2019 03:29:32 +0000 (+0800) Subject: Add docs-linkcheck to test links X-Git-Tag: v0.3.0~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=1390dc14c8ddbe1b4f890b5c5c34cada9ab66ee9;p=releng%2Fdocs-conf.git Add docs-linkcheck to test links Change-Id: I83e718791c22311be0d96dd9137308a79c9fd14a Signed-off-by: Thanh Ha --- diff --git a/docs/conf.py b/docs/conf.py index 0607d9e..0d3ab61 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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', +] diff --git a/docs/install.rst b/docs/install.rst index 7116460..e58749f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -55,10 +55,10 @@ Follow these steps to install lfdocs-conf: project. The first line ".. _my-project:" is a special Sphinx `cross-ref - `_ 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. + `_ + 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 --- 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}