-
Notifications
You must be signed in to change notification settings - Fork 2
Fix broken documentation links and add automated link validation #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b950193
Initial plan
Copilot cf37c3e
Fix broken documentation links and add automated validation
Copilot 31f1d23
Add scripts README documentation
Copilot 591dc00
Address code review feedback
Copilot f60234c
Revert incorrect link changes - fumadocs requires /docs/ prefix
Copilot 2a950fc
Fix validation workflow to not fail on pre-existing broken links
Copilot fa7ae26
Fix all 40 broken documentation links
Copilot bb5fe3f
Fix: Correct fumadocs link behavior - remove /docs/ prefix from markdown
Copilot 96b1fb7
Fix broken links in MDX documentation files
Copilot cbb5de3
Convert absolute paths to relative paths in MDX files
Copilot 30cdb1b
Fix: Correct fumadocs link behavior - links SHOULD include /docs/ prefix
Copilot 0f782d1
Add lychee-action workflow for automated link checking
Copilot 609631b
Remove custom link validation script, keep only lychee-action
Copilot 35f1fe1
Fix remaining broken links and add lychee.toml configuration
Copilot 08fca1d
Fix lychee.toml syntax error - use correct remap format
Copilot c34321a
Fix lychee.toml remap syntax - use array format
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Check Links | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| check-links: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check links with Lychee | ||
| uses: lycheeverse/lychee-action@v1 | ||
| with: | ||
| # Scan all markdown files in docs directory and README | ||
| args: | | ||
| --verbose | ||
| --no-progress | ||
| --config lychee.toml | ||
| 'docs/**/*.md' | ||
| 'docs/**/*.mdx' | ||
| 'README.md' | ||
| # Fail the action on broken links | ||
| fail: true | ||
| env: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Ignore localhost links (development/testing) | ||
| http://localhost* | ||
|
|
||
| # Ignore example links | ||
| https://example.com | ||
|
|
||
| # Ignore social media links (anti-scraping measures) | ||
| https://twitter.com* | ||
| https://x.com* |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Lychee configuration file for ObjectUI documentation link checking | ||
| # This configuration enables checking internal fumadocs links by mapping | ||
| # Next.js routes (e.g., /docs/guide) to filesystem paths (e.g., docs/guide.mdx) | ||
|
|
||
| # Maximum number of concurrent requests | ||
| max_concurrency = 10 | ||
|
|
||
| # Timeout for each request (in seconds) | ||
| timeout = 20 | ||
|
|
||
| # Number of retries per request | ||
| max_retries = 3 | ||
|
|
||
| # Accept any valid status code (2xx, 3xx) | ||
| accept = [200, 204, 206, 301, 302, 303, 307, 308] | ||
|
|
||
| # Exclude patterns - files and URLs to skip | ||
| exclude = [ | ||
| # Local development URLs | ||
| "http://localhost*", | ||
| "https://localhost*", | ||
|
|
||
| # Example and placeholder URLs | ||
| "https://example.com", | ||
| "http://example.com", | ||
|
|
||
| # Social media (anti-scraping) | ||
| "https://twitter.com*", | ||
| "https://x.com*", | ||
|
|
||
| # GitHub specific patterns that may cause false positives | ||
| "https://github.com/.*/compare/*", | ||
| "https://github.com/.*/commit/*", | ||
| ] | ||
|
|
||
| # Path remapping for fumadocs internal links | ||
| # Maps Next.js routes to actual file paths | ||
| # Format: ["pattern to match", "replacement"] | ||
| remap = [ | ||
| # Map /docs/* links to docs/ filesystem paths | ||
| # The file:// prefix tells lychee to check local files | ||
| "^/docs/(.*)$ file://./docs/$1" | ||
| ] | ||
|
|
||
| # Cache configuration | ||
| [cache] | ||
| # Don't use cache to ensure fresh results | ||
| max_age = "0s" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section updates the hero and Quick Links to use the
/docs/prefix, but further down in this same file there are still internal links like/guide/quick-start,/components/, and CTA buttons that point to non-prefixed paths. To avoid 404s and keep internal links consistent with the documented/docs/convention, please update the remaining links indocs/index.mdto include the/docs/prefix as well (e.g., in the "Getting Started" list and the final call-to-action buttons).