Skip to content

Test/fragment anchor validation - #2713

Draft
holly-cummins wants to merge 2 commits into
quarkusio:mainfrom
holly-cummins:test/fragment-anchor-validation
Draft

Test/fragment anchor validation#2713
holly-cummins wants to merge 2 commits into
quarkusio:mainfrom
holly-cummins:test/fragment-anchor-validation

Conversation

@holly-cummins

Copy link
Copy Markdown
Contributor

Marking as draft, because this is red! Which is good!

I mean, it's bad that it's red, but it's found problems that need fixing before it can merge. This tests #anchor in pages, rather than just the top level page. Bad anchors won't cause a 404, but they're sloppy – and easy to get wrong. (I'm surprised our adoc doesn't pick them, is there a strictness setting we need to be changing?)

@holly-cummins
holly-cummins marked this pull request as draft June 12, 2026 10:42
@holly-cummins
holly-cummins force-pushed the test/fragment-anchor-validation branch from 020721c to 9a0056d Compare July 10, 2026 11:24
@github-actions

Copy link
Copy Markdown

🎊 PR Preview 35958d8 has been successfully built and deployed to https://quarkus-website-pr-2713-preview.surge.sh

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@holly-cummins

Copy link
Copy Markdown
Contributor Author

Needs quarkusio/quarkus#55413 to make it into a release, so maybe it shouldn't be checking the latest pages, only main. But it is kind of useful to have the validation on both. Hopefully once we have a clean slate checking on latest will never go red without an early warning from /main first.

@holly-cummins
holly-cummins force-pushed the test/fragment-anchor-validation branch from 108d7c5 to 0a1a3bf Compare July 24, 2026 16:29
@holly-cummins

Copy link
Copy Markdown
Contributor Author

Should be good to merge once 3.38 is out.

holly-cummins and others added 2 commits August 3, 2026 11:17
Compare the built site against the gh-pages branch to find changed
HTML files. When 15 or fewer pages changed and no build infrastructure
files were modified, run the link crawler only on those pages (depth-1
check). This avoids a full-site crawl on small PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

# Conflicts:
#	.github/workflows/build.yml
#	src/test/java/io/quarkusio/LinkCrawlerTest.java
Crawls internal pages and verifies that #fragment targets exist as
element IDs on the destination page. Uses the same test.crawl.*
properties as LinkCrawlerTest so both tests share the same Maven
command line, including incremental mode from changed-paths.

Instead of a separate test class with its own BFS crawl (which only
covered 57 of 128 pages due to a URL resolution bug), fragment anchors
are now collected during the existing multi-threaded crawl and verified
in a single pass afterward. Also fixes a duplicated incremental-mode
check in crawLoop.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant