* fix(docs): resolve TypeScript build errors and search configuration Fix invalid LayoutProps type in [lang]/(docs)/layout.tsx to use proper Next.js 16 async layout component signature. Add type assertion in i18n.ts isLocale function to satisfy strict type checking. Configure search to use English indexing since Orama doesn't support Chinese. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * feat(docs): configure static export following Fumadocs guidelines - Enable Next.js static export with output: 'export' - Configure static search using staticGET and revalidate: false - Update search UI to use type: 'static' for client-side search - Add localeMap to support both English and Chinese locales - Remove rewrites (incompatible with static export) - Remove route handlers that conflict with static export: - /llms.mdx route (file extension conflicts) - /llms-full.txt route - /og/docs OG image generation - Add trailingSlash: true for better route handling Build successfully generates 9 static pages (2.7MB total). Search indexes are exported as static files for client-side use. Reference: https://www.fumadocs.dev/docs/deploying/static Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(docs): resolve 404 issues in static export - Change hideLocale from 'default-locale' to 'never' for static export compatibility (middleware doesn't work in static builds) - Add public/index.html to redirect root path to /en/ - Update middleware matcher to remove deleted route exclusions - All pages now accessible with language prefix (/en/, /zh/) This fixes the 404 issue where middleware-based rewrites don't work in static exports. Now all URLs explicitly include the language code. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(docs): serve English content at root path without redirect - Restore hideLocale to 'default-locale' for cleaner URLs - Add post-export script to copy /en/ content to root directory - English pages now accessible at both / and /en/ - Chinese pages remain at /zh/ - Remove redirect page in favor of direct content serving - Add "type": "module" to package.json for ES modules This provides a better user experience by serving English content directly at the root path (/, /cookies/, /faq/) without requiring a redirect, while maintaining /en/ for explicit access. Output size: 3.2MB (includes both root and /en/ copies) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
docs
This is a Next.js application generated with Create Fumadocs.
Run development server:
npm run dev
# or
pnpm dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
Explore
In the project, you can see:
lib/source.ts: Code for content source adapter,loader()provides the interface to access your content.lib/layout.shared.tsx: Shared options for layouts, optional but preferred to keep.
| Route | Description |
|---|---|
app/(home) |
The route group for your landing page and other pages. |
app/docs |
The documentation layout and pages. |
app/api/search/route.ts |
The Route Handler for search. |
Fumadocs MDX
A source.config.ts config file has been included, you can customise different options like frontmatter schema.
Read the Introduction for further details.
Learn More
To learn more about Next.js and Fumadocs, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Fumadocs - learn about Fumadocs