check-topic-links.py validates that all documentation topic links in the Juneau source code are correct and point to valid topics with matching titles.
The script performs three main operations:
Extracts Topic Information - Scans pages/topics (relative to the juneau-docs repository root) for all markdown files and extracts:
Finds Topic Links - Scans the Juneau Java source tree (--juneau-root, default sibling ../master/ then ../juneau/) for links in the format:
https://juneau.apache.org/docs/topics/SLUG">TITLE</a>
Validates Links - Reports any issues:
cd /path/to/juneau-docs python3 scripts/check-topic-links.py
The script will automatically:
pages/topics for topic definitions../master/, falling back to ../juneau/)python3 scripts/check-topic-links.py --juneau-root /path/to/juneau python3 scripts/check-topic-links.py --docs-root /path/to/juneau-docs --juneau-root /path/to/juneau
--docs-root defaults to the checkout containing the script.
The script checks the following file types:
.java - Java source files.md - Markdown files.xml - XML configuration files.properties - Properties files.txt - Text files.adoc - AsciiDoc files.rst - reStructuredText files0 - Success, all links validated1 - Error occurred or validation issues found../master/ checkout (the Java tree) alongside juneau-docsbuild-docs.py