Skip to content

Fix documentation routing for i18n static export#13

Merged
yangbooom merged 3 commits intomainfrom
copilot/fix-missing-redirect-links
Jan 23, 2026
Merged

Fix documentation routing for i18n static export#13
yangbooom merged 3 commits intomainfrom
copilot/fix-missing-redirect-links

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Documentation site had broken routing due to incompatibility between Next.js static export and internationalized paths. Root redirect failed, navigation lacked project links, and internal doc links used absolute paths incompatible with i18n structure.

Changes

  • Root redirect: Replace server-side redirect() with client-side navigation + meta refresh fallback to support static export

    // app/page.tsx
    useEffect(() => {
      window.location.href = `${basePath}/en`;
    }, []);
  • Navigation: Add githubUrl prop and Home link to DocsLayout with bilingual support

  • Internal links: Convert 77 absolute paths (/docs/...) to relative paths across 24 MDX files

    • Same directory: ./page
    • Cross directory: ../section/page
    • Ensures compatibility with /{lang}/docs/* URL structure
Original prompt

the docs page has some redirect links missing (404) due to intl


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 22, 2026 12:39
- Add client-side redirect with meta refresh fallback for root page to handle static export
- Add GitHub repository link to docs navigation
- Add Home link to navigate back to landing page from docs
- Support both English and Korean languages in navigation

Co-authored-by: yangbooom <23739014+yangbooom@users.noreply.github.com>
- Changed absolute paths like /docs/directory/page to relative paths
- Index files now use ./page for same-directory links
- Cross-directory links now use ../directory or ../directory/page
- Fixed 24 MDX files across both en and ko documentation
- All links now follow Fumadocs conventions for proper navigation

Co-authored-by: yangbooom <23739014+yangbooom@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing redirect links on docs page Fix documentation routing for i18n static export Jan 22, 2026
Copilot AI requested a review from yangbooom January 22, 2026 12:46
@yangbooom yangbooom marked this pull request as ready for review January 22, 2026 12:49
@yangbooom yangbooom merged commit f8dffa4 into main Jan 23, 2026
3 checks passed
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.

2 participants