Commit Graph

4 Commits

Author SHA1 Message Date
Nexmoe
e2bfa334c0 docs(protocol): add vidbee protocol docs (#150) 2026-01-18 14:13:37 +08:00
Nexmoe
b6c67b23f6 feat(docs): generate sitemap for docs site (#148)
* docs: add VidBee Docs suffix to all documentation page titles

Update the page title metadata generation to append "| VidBee Docs" to all documentation page titles for consistent branding across the site.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* docs: add canonical URLs to documentation pages

Add canonical URL metadata to all documentation pages to prevent search engine duplication issues and improve SEO rankings.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* feat(docs): add automatic sitemap

* fix(docs): align canonical base URL

* fix(docs): configure sitemap for static export

Add 'export const dynamic = "force-static"' to sitemap.ts to enable
static generation when using Next.js output: export mode. This fixes
the build error: "export const dynamic = 'force-static'/export const
revalidate not configured on route '/sitemap.xml'".

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* chore(docs): add favicon and icon assets

Add favicons and app icons in various sizes for better browser
and platform support.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-18 13:26:34 +08:00
Nexmoe
129899ed61 fix(docs): resolve TypeScript build errors (#144)
* 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>
2026-01-17 16:31:24 +08:00
Nexmoe
1f821b67dd docs: add fumadocs documentation site (#142) 2026-01-17 14:37:43 +08:00