From f110bcd59e665c0d4a00623fd8f48050e61945c1 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Fri, 29 May 2020 12:48:53 -0400 Subject: [PATCH] Turn on linkchecker in sphinx for documentation (#69590) * add make linkcheckerdocs as option to verify external links * add back anchor checks * spacing nit * fix shippable issue * Update docs/docsite/rst/conf.py Co-authored-by: Sviatoslav Sydorenko Co-authored-by: Sviatoslav Sydorenko --- Makefile | 4 ++++ docs/docsite/Makefile | 3 +++ docs/docsite/rst/conf.py | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index d49d0f0bd49..0ac82932574 100644 --- a/Makefile +++ b/Makefile @@ -268,6 +268,10 @@ epub: webdocs: (cd docs/docsite/; CPUS=$(CPUS) $(MAKE) docs) +.PHONY: linkcheckdocs +linkcheckdocs: + (cd docs/docsite/; CPUS=$(CPUS) $(MAKE) linkcheckdocs) + .PHONY: generate_rst generate_rst: lib/ansible/cli/*.py mkdir -p ./docs/man/man1/ ; \ diff --git a/docs/docsite/Makefile b/docs/docsite/Makefile index ec59d5a3cab..3b0b512b243 100644 --- a/docs/docsite/Makefile +++ b/docs/docsite/Makefile @@ -46,6 +46,9 @@ htmldocs: generate_rst singlehtmldocs: generate_rst CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx singlehtml +linkcheckdocs: generate_rst + CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx linkcheck + webdocs: docs #TODO: leaving htmlout removal for those having older versions, should eventually be removed also diff --git a/docs/docsite/rst/conf.py b/docs/docsite/rst/conf.py index 8a76e89fd23..34f2b3d376c 100644 --- a/docs/docsite/rst/conf.py +++ b/docs/docsite/rst/conf.py @@ -283,3 +283,10 @@ intersphinx_mapping = {'python': ('https://docs.python.org/2/', (None, '../pytho 'ansible_2_6': ('https://docs.ansible.com/ansible/2.6/', (None, '../ansible_2_6.inv')), 'ansible_2_5': ('https://docs.ansible.com/ansible/2.5/', (None, '../ansible_2_5.inv')), } + +# linckchecker settings +linkcheck_ignore = [ + r'http://irc\.freenode\.net', +] +linkcheck_workers = 25 +# linkcheck_anchors = False