You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Correct fumadocs link behavior - remove /docs/ prefix from markdown
I misunderstood how fumadocs links work. The baseUrl: '/docs' config means
fumadocs AUTOMATICALLY prepends /docs to internal links at runtime.
Links in markdown should NOT include /docs/ prefix:
- ❌ WRONG: [Guide](/docs/guide/quick-start) → renders as /docs/docs/guide/quick-start
- ✅ CORRECT: [Guide](/guide/quick-start) → fumadocs renders as /docs/guide/quick-start
Changes:
- Reverted all link "fixes" from commit fa7ae26 (those were breaking links)
- Updated validation script to detect /docs/ prefix as an ERROR
- Updated CONTRIBUTING.md with correct link conventions
- Updated scripts/README.md with correct examples
- Updated GitHub Actions workflow message with correct guidance
This fixes the broken links reported on the Vercel deployment.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
<!-- Correct - internal links should NOT include /docs/ prefix -->
430
+
[Quick Start](/guide/quick-start)
431
+
[Components](/components)
432
+
[API Reference](/reference/api/core)
433
+
[Protocol Specs](/reference/protocol/overview)
434
+
[Architecture](/architecture/component)
435
435
```
436
436
437
437
#### ❌ Incorrect Link Patterns
438
438
439
439
```markdown
440
-
<!-- Wrong - missing /docs/ prefix -->
441
-
[Quick Start](/guide/quick-start)<!-- ❌ Should be /docs/guide/quick-start -->
442
-
[Components](/components)<!-- ❌ Should be /docs/components -->
440
+
<!-- Wrong - includes /docs/ prefix (fumadocs adds this automatically)-->
441
+
[Quick Start](/docs/guide/quick-start)<!-- ❌ Should be /guide/quick-start -->
442
+
[Components](/docs/components)<!-- ❌ Should be /components -->
443
443
444
444
<!-- Wrong - incorrect paths -->
445
-
[API Reference](/api/core)<!-- ❌ Should be /docs/reference/api/core -->
446
-
[Spec](/spec/component)<!-- ❌ Should be /docs/architecture/component -->
447
-
[Protocol](/protocol/form)<!-- ❌ Should be /docs/reference/protocol/form -->
445
+
[API Reference](/api/core)<!-- ❌ Should be /reference/api/core -->
446
+
[Spec](/spec/component)<!-- ❌ Should be /architecture/component -->
447
+
[Protocol](/protocol/form)<!-- ❌ Should be /reference/protocol/form -->
448
448
```
449
449
450
450
#### Why?
451
451
452
-
Fumadocs is configured with `baseUrl: '/docs'`, which means all documentation pages are served under the `/docs`route. Internal links must include the `/docs/`prefix to match the actual URL structure where the pages are accessible.
452
+
Fumadocs is configured with `baseUrl: '/docs'`, which automatically prepends `/docs`to all internal links at runtime. If you include `/docs/`in your markdown links, the final URL will be `/docs/docs/...` (double prefix), causing 404 errors.
453
453
454
454
#### Validating Links
455
455
@@ -462,7 +462,7 @@ pnpm validate:links
462
462
463
463
This will check:
464
464
- Links point to existing files and routes
465
-
- Links use correct path structure
465
+
- Links do NOT incorrectly include /docs/ prefix
466
466
- Suggestions for fixing common issues
467
467
468
468
The validation runs automatically on PRs that modify documentation files.
Copy file name to clipboardExpand all lines: docs/architecture/base-components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This specification defines the metadata structure for ObjectQL's built-in platfo
14
14
- Enable marketplace distribution
15
15
16
16
**Scope:** This document covers the complete metadata specification for all platform base components, including data display, data entry, layout, navigation, and visualization components.
17
-
For the low-level UI component library (Button, Input, Dialog, etc.), please refer to the [Component Library Reference](/docs/architecture/component-library).
17
+
For the low-level UI component library (Button, Input, Dialog, etc.), please refer to the [Component Library Reference](component-library.md).
0 commit comments