Checks that links to topic pages of the Juneau documentation site, found in the source tree, use the slug and title the topic pages define.
python3 scripts/check-topic-links.py
None.
*.md file (except README.md) in docs/pages/topics and takes slug and title from the front matter (extract_topic_info).target, node_modules, build, dist and scripts, and reads .java, .md, .xml, .properties, .txt, .adoc and .rst files (find_topic_links). Code blocks and inline code are removed from markdown files first.https://juneau.apache.org/docs/topics/<slug>">Title</a> link with its file and line.UNKNOWN SLUG) or whose link text differs from the page title (TITLE MISMATCH) (check_links).Progress lines, then either All topic links are correct! or a list of warnings, each with file, line, slug, expected and actual title, and the link. Everything goes to stdout.
| Code | Meaning |
|---|---|
| 0 | The scan finished, with or without warnings. |
| 1 | No topics were found, for example because docs/pages/topics does not exist. |
docs/ in this checkout, so it needs that directory present.04.03.06.ScriptCheckTopicLinks.md in juneau-docs)