chore: add a deadlink checker for nav/sidebar items#1236
Merged
mujahidkay merged 3 commits intomainfrom Dec 27, 2024
Merged
Conversation
6e086d2 to
89fb868
Compare
Deploying documentation with
|
| Latest commit: |
26875df
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f13d514a.documentation-7tp.pages.dev |
| Branch Preview URL: | https://mk-deadlink-checker.documentation-7tp.pages.dev |
89fb868 to
5cdb64a
Compare
|
Cloudflare deployment logs are available here |
Contributor
|
@mujahidkay wondering whether we have any other options to fix #1225 ? |
Member
Author
I think Linkinator seems like another option but I haven't really tested it. I will give it a go in my free time. |
amessbee
reviewed
Oct 14, 2024
scripts/checkLinks.mjs
Outdated
| const __dirname = path.dirname(__filename); | ||
|
|
||
| const extractLinks = (content) => { | ||
| const linkRegex = /link:\s*'([^']+)'/g; |
Contributor
There was a problem hiding this comment.
I guess there is nothing to stop someone from using double quotes with links?
Contributor
There was a problem hiding this comment.
I think this would also break the CI if there is a comment that contains a broken link?
b0fe23f to
9bf48e6
Compare
9bf48e6 to
3fc7dd8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #1225
Added this check to build script to keep it consistent with vitepress's built-in deadlink checker for md files (raises error during build time)
Unrelated but also formats the scripts dir.
Testing:
You can test by checking out the branch and entering invalid links.