Skip to content

docs: link current URLs, add search titles and descriptions, check page URLs in CI - #17145

Merged
Maffooch merged 9 commits into
DefectDojo:devfrom
Maffooch:docs/search-health-links-and-checks
Dec 3, 2026
Merged

Maffooch merged 9 commits into
DefectDojo:devfrom
Maffooch:docs/search-health-links-and-checks

Conversation

@Maffooch

@Maffooch Maffooch commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

The 2026 docs restructure moved most pages off /en/.... The old URLs still redirect, but docs.defectdojo.com is served by GitHub Pages, so each redirect is a meta refresh rather than a 301, and search engines pass rankings over slowly. Search data showed the old URLs losing clicks and branded queries slipping. This PR stops linking through those redirects, gives the most-viewed pages their own search titles and descriptions, and adds a check that a moved page keeps its old URL.

  • 125 parser pages linked the deduplication page through an old /en/ URL; they now link /triage_findings/finding_deduplication/about_deduplication/. Other links through aliases (product_hierarchy, about_connectors) now go to the pages themselves.
  • README.md linked /en/open_source/api-v2-docs/, which returns 404. The Add Tests and Import Scan forms linked an old URL that landed on the Pro import page; they now open the Open Source one. CONTRIBUTING, DOCKER, the PR template and a settings comment are off /en/ URLs. dojo/api_v3/errors.py keeps its URL, since it is part of the API's error type identifiers.
  • A stray copy of the 3.2 upgrade notes at docs/content/en/open_source/upgrading/3.2.md is removed; its URL is now an alias of /releases/os_upgrading/3.2/.
  • Three FAQ translations linked an old /en/ URL; they now link the page.
  • Home, About, Supported Tools (titled "Index" until now), FAQ, the Open Source Jira pages and the SonarQube parser pages get their own descriptions, and seo.title where several pages shared one title.
  • New scripts/docs_check_page_urls.py, run by "Docs: Dry Run Production Deployment" on pull requests: a page or translation moved or deleted without an alias for its old URL, an alias that is another page's URL, an alias two pages list, or a new link (markdown, reference-style or HTML href) to an old or alias URL fails it. The workflow now also runs for changes under dojo/templates and dojo/settings. A page moved to the Pro docs repository is listed in docs/.pages-moved-out, where the check only warns, since its alias lives in that repository. A new workflow, "Docs: links from the app" (docs_links_in_app.yml), refuses new docs.defectdojo.com/en/ links in dojo/, the README and readme-docs on every pull request and merge group. It is one git grep.
  • New docs-seo skill (.claude/skills/docs-seo/) with the rules, and the parser skill now asks parser pages for a description.

Merge order

Merge this after the docs site change that adds scripts/check_page_urls.py, scripts/audit_site.py and the title template to the docs site repository. The docs-seo skill here describes those files, and the site's title template is what adds "(Pro)" / "(Open Source)" to search titles. Nothing breaks if this lands first; the skill would describe files that are not there yet.

Test results

  • Every step of validate_docs_build.yml run locally on this branch: page URL check (0 errors), the /en/ link check, the title and Pro-page checks, the production Hugo build, and lychee on the built site and on the in-app links (0 errors each).
  • ruff check .: clean. actionlint on the workflow: clean.
  • The full docs.defectdojo.com build (with the Pro pages) on this branch: builds, 0 broken links, and no alias chains or lost live URLs.
  • Not run: the unit tests. The only code changes are two template hrefs and a comment in dojo/settings/settings.py.

Documentation

The changes are documentation, plus the docs CI.

🤖 Generated with Claude Code

Maffooch and others added 5 commits December 2, 2026 17:40
Adds a docs-seo skill and check_page_urls.py: a moved or deleted page must keep
its old URL as an alias, aliases must not chain, links go to current paths
instead of /en/ or alias URLs, and every page needs its own description and a
topic title. The parser skill now points parser pages at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions

- 125 parser pages linked the hashcode explanation through an old /en/ URL;
  they now link /triage_findings/finding_deduplication/about_deduplication/.
- Links through the product_hierarchy and Pro about_connectors aliases now go
  to the pages themselves.
- README linked /en/open_source/api-v2-docs/, which returns 404; the import
  forms linked an old URL that landed on the Pro import page instead of the
  Open-Source one. Contributing, Docker docs, the PR template and a settings
  comment also moved off /en/ URLs.
- A stray copy of the 3.2 upgrade notes at /en/open_source/upgrading/3.2/ is
  now an alias to /releases/os_upgrading/3.2/.
- Home, About, Supported Tools (was titled "Index"), FAQ, the Open-Source Jira
  pages and the SonarQube parser pages get their own descriptions, and seo.title
  where several pages shared one title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- validate_docs_build.yml runs scripts/docs_check_page_urls.py on pull
  requests: a page moved or deleted without an alias for its old URL, an alias
  that is another page's URL, or a new link to an old or alias URL fails it.
- It also refuses a docs.defectdojo.com/en/ link in dojo/, the README,
  readme-docs and the PR template (dojo/api_v3/errors.py is exempt: that URL
  is part of the API's error type identifiers).
- The checker moves from the skill folder to scripts/, and the skill now
  describes the site's automatic edition suffix in search titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page URL check and the /en/ link check read scripts/docs_*.py, README.md,
readme-docs and the PR template, so a pull request that changes only those
runs them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Maffooch
Maffooch requested a review from blakeaowens as a code owner December 3, 2026 04:48
@Maffooch Maffooch added this to the 3.6.0 milestone Dec 3, 2026
Maffooch and others added 4 commits December 2, 2026 21:58
…age URLs

From the review of the docs search changes:
- docs_check_page_urls.py now covers translations: a moved or deleted
  Name.<lang>.md must keep its /<lang>/ URL as an alias, like an English page.
- An alias two pages list is an error (only one of them gets it).
- Reference-style links and HTML hrefs are checked as well as markdown links.
- Changed lines are compared with the branch's merge base, not the tip of
  --base, so a branch behind dev is not blamed for lines dev changed.
- Missing-description and Index-title warnings only cover pages the branch
  adds or whose front matter it changes, not every page it touches.
- Three FAQ translations linked an old /en/ URL; they now link the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…emplate changes

From the review of the docs search changes:
- The home page search title was 88 characters and is cut off in results;
  it is now 61. The Open Source Jira overview description is now inside the
  120 to 160 characters the docs-seo skill asks for.
- validate_docs_build.yml also runs on pull requests that change
  dojo/templates or dojo/settings, where the app links the docs, so the old
  /en/ link refusal runs on the pull request and not only in the merge queue.
- The docs-seo skill describes the checker's new translation, duplicate alias
  and link-form checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs_check_page_urls.py reads aliases past blank and comment lines in an
  alias list, skips links inside fenced code blocks, and no longer counts an
  empty seo.description as a description.
- A page moved to the Pro docs repository can be listed in
  docs/.pages-moved-out: its alias lives there, so the move only warns
  instead of failing a check that could never pass.
- The old /en/ docs URL refusal moves to its own workflow,
  docs_links_in_app.yml, which runs on every pull request and merge group, so
  a link added in any dojo/ file (deprecations.py, the API views) is caught on
  the pull request. It is one git grep.
- The docs-seo skill's checker paragraph is wrapped, and it documents the new
  list and workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link to an /en/ URL that is neither a page nor an alias in this repository
may be one the DefectDojo Pro docs repository defines, which this check cannot
see, so it warns instead of failing a check no change could pass. The site
build's link check still fails it if it resolves nowhere. Same file as the Pro
docs repository's scripts/check_page_urls.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Maffooch
Maffooch added this pull request to the merge queue Dec 3, 2026
Merged via the queue into DefectDojo:dev with commit 4d681d2 Dec 3, 2026
43 checks passed
@Maffooch
Maffooch deleted the docs/search-health-links-and-checks branch December 3, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants