-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Update documentation site to use fumadocs #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: hotlong <[email protected]>
Co-authored-by: hotlong <[email protected]>
|
@copilot 继续 |
- Remove fumadocs-ui/style.css import that was causing @layer base error - Simplify docs layout and page components - Site works in dev mode (pnpm dev) but build has issues with page data collection - Issue appears to be related to fumadocs-mdx version compatibility during static build Co-authored-by: huangyiirene <[email protected]>
I've continued the migration and made significant progress: ✅ Working:
🔧 In Progress:
The site works perfectly in development mode. I'm continuing to work on resolving the build issue. |
|
|
| @@ -0,0 +1,28 @@ | |||
| import { source } from '@/lib/source'; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
In general, the correct fix for an unused import is to remove the import statement (or at least the unused binding) so that the code reflects only what is actually needed. This improves readability and slightly reduces bundle size and initialization work.
For this specific file apps/site/app/docs/layout.tsx, the source symbol from '@/lib/source' is not referenced anywhere. The best fix that does not change existing functionality is to delete line 1 entirely, leaving only the ReactNode type import. No other code changes are needed, and no new imports or methods are required.
| @@ -1,4 +1,3 @@ | ||
| import { source } from '@/lib/source'; | ||
| import type { ReactNode } from 'react'; | ||
|
|
||
| export default function Layout({ children }: { children: ReactNode }) { |
| @@ -0,0 +1,13 @@ | |||
| import { docs, meta } from '../.source/server'; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
In general, to fix an unused import, you either remove the unused symbol from the import list or start using it meaningfully. To avoid changing existing functionality, the best approach here is to remove only the unused meta specifier and keep the docs import intact.
Specifically, in apps/site/lib/source.ts, line 1 should be updated from a named import of both docs and meta to importing only docs. No additional methods, imports, or definitions are required elsewhere, since no code uses meta now.
-
Copy modified line R1
| @@ -1,4 +1,4 @@ | ||
| import { docs, meta } from '../.source/server'; | ||
| import { docs } from '../.source/server'; | ||
| import { loader } from 'fumadocs-core/source'; | ||
| import { icons } from 'lucide-react'; | ||
| import { createElement } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: huangyiirene <[email protected]>
Migrate Documentation Site to Fumadocs
apps/sitedirectory structure/docsto/content/docspnpm docs:dev)Current Status
The documentation site is functional in development mode. You can start it with:
There's a known issue with the production build related to Next.js's static page data collection when using fumadocs-mdx. The dev server works perfectly and all documentation content has been migrated successfully.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.