Skip to content

Conversation

@thecuvii
Copy link
Contributor

@thecuvii thecuvii commented Jan 22, 2026

  1. Replace the search dialog with DefaultSearchDialog because the built-in dialog throws a client-side exception during searches.

  2. Simplify the generateStaticParams implementation.

  3. Set prefetch to "auto" because some links are broken when using static export, but it works well in development mode and normal build mode. I haven't investigated the root cause yet.

…ponent

- Updated `generateStaticParams` to filter out existing root paths and return a structured array with the root path first for optional catch-all routes.
- Refactored the `Heading` component to simplify rendering logic and improve accessibility by incorporating an `id` prop for anchor links.
…tegration

- Changed the development server port in `package.json` to 3001 for better accessibility.
- Integrated `SearchDialog` from `fumadocs-ui` and updated `RootProvider` to include a custom search dialog in `layout.tsx`.
- Refactored `DefaultSearchDialog` to export as a named function and improved query handling in `search.tsx`.
- Added `dynamic = 'force-static'` export to the `page.tsx` file to ensure static rendering for dynamic routes, improving performance and SEO.
- Removed unused `SearchDialog` import from `layout.tsx` to streamline the code.
- Deleted the `dynamic` export from `page.tsx`, as it is no longer necessary for static rendering.
- Removed the port specification from the development server command in `package.json` to streamline the setup process.
…nt server command

- Simplified the `generateStaticParams` function in `page.tsx` to directly return parameters from the source, enhancing clarity.
- Updated the development server command in `package.json` to specify port 3001 for improved accessibility.
- Updated the `generateStaticParams` function to include a root path entry, ensuring proper handling of the root path alongside parameters generated from the source.
- Streamlined the rendering logic in the `Heading` component by consolidating the anchor link creation and default properties into a single `useRender` call, enhancing code clarity and maintainability.
- Removed the port specification from the development server command in `package.json` to simplify the setup process.
- Eliminated the unused `prefetch` prop in the `SidebarItem` component, enhancing code clarity and reducing unnecessary complexity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant