doc: tweak Sphinx linkcheck options
Sphinx has a builder option that we can use to check links (invoked with '$ make linkcheck' in the /doc folder) Add some configuration tweaks to conf.py, and update the Makefile to also use the nitpick (-n) option to Sphinx if this linkcheck build option is selected (does much more checking of internal references) Change-Id: Ib413bc8d4195c72f1a8a4c345a5a722f88fad8b8 Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
parent
0d88984b76
commit
2a1adfccae
2 changed files with 14 additions and 2 deletions
|
@ -194,8 +194,8 @@ changes:
|
||||||
@echo
|
@echo
|
||||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||||
|
|
||||||
linkcheck:
|
linkcheck: content kconfig
|
||||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
$(SPHINXBUILD) -n -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||||
@echo
|
@echo
|
||||||
@echo "Link check complete; look for any errors in the above output " \
|
@echo "Link check complete; look for any errors in the above output " \
|
||||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||||
|
|
12
doc/conf.py
12
doc/conf.py
|
@ -335,5 +335,17 @@ html_context = {
|
||||||
|
|
||||||
extlinks = {'jira': ('https://jira.zephyrproject.org/browse/%s', '')}
|
extlinks = {'jira': ('https://jira.zephyrproject.org/browse/%s', '')}
|
||||||
|
|
||||||
|
# some configuration for linkcheck builder
|
||||||
|
# noticed that we're getting false-positive link errors on JIRA, I suspect
|
||||||
|
# because it's taking too long for the server to respond so bump up the
|
||||||
|
# timeout (default=5) and turn off anchor checks (so only a HEAD request is
|
||||||
|
# done - much faster) Leave the ignore commented in case we want to remove
|
||||||
|
# jira link checks later...
|
||||||
|
|
||||||
|
linkcheck_timeout = 30
|
||||||
|
linkcheck_workers = 10
|
||||||
|
# linkcheck_ignore = [r'https://jira\.zephyrproject\.org/']
|
||||||
|
linkcheck_anchors = False
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_stylesheet("zephyr-custom.css")
|
app.add_stylesheet("zephyr-custom.css")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue