Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@manovotny
Copy link
Contributor

@manovotny manovotny commented Oct 28, 2025

What does this solve?

Prevents bad/broken docs links. Example → #2749

What changed?

Adds a check to the validateLinks plugin for links starting with docs/ (which will fail) instead of /docs/.

Running on this PR before merging the fixes already in main:

CleanShot 2025-10-28 at 13 13 01@2x

After brining in the changes from main: ✅

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

@manovotny manovotny requested a review from a team as a code owner October 28, 2025 17:12
@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
clerk-docs Ready Ready Preview Oct 28, 2025 6:54pm

@SarahSoutoul
Copy link
Contributor

Digged into the history, because I was surprised we didn't have a script for this, and we did have one but seems to have gotten deleted as part of the IA restructure. I'm not sure why it got deleted, but just putting this out there for ref. @NWylynko might have some more info here.

@manovotny
Copy link
Contributor Author

Digged into the history, because I was surprised we didn't have a script for this, and we did have one but seems to have gotten deleted as part of the IA restructure. I'm not sure why it got deleted, but just putting this out there for ref. @NWylynko might have some more info here.

Not sure. I tried adding it back and It's currently throwing 188 warnings.

@NWylynko
Copy link
Contributor

NWylynko commented Oct 28, 2025

Can we just update scripts/lib/plugins/validateLinks.ts around line 46 to do this check? Just add the error to the scripts/lib/error-messages.ts file around line 71.

I removed the old link checker as validateLinks.ts does more checks (specifically also doing hash checks) and hooks in to the ignore list when a page should be skipped from validation.

@manovotny manovotny changed the title Adds link checker Adds a check to the validateLinks plugin Oct 28, 2025
@manovotny
Copy link
Contributor Author

@NWylynko @SarahSoutoul PR has been completely revamped based on the validateLinks.ts suggestion. Please have another look.

@NWylynko
Copy link
Contributor

Would you mind adding a test to scripts/build-docs.test.ts

@manovotny
Copy link
Contributor Author

@NWylynko test added.

@manovotny manovotny merged commit d833b7f into main Oct 28, 2025
8 checks passed
@manovotny manovotny deleted the add-link-checker branch October 28, 2025 18:57
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.

4 participants