-
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
Draft
Copilot
wants to merge
5
commits into
main
Choose a base branch
from
copilot/update-documentation-site-to-fumadocs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
034f27a
Initial plan
Copilot aa10824
Create apps/site with Fumadocs setup and migrate documentation content
Copilot 5c78893
Changes before error encountered
Copilot 748c85b
Fix CSS import issue and simplify page components - dev server works
Copilot 9ba2af4
Changes before error encountered
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # next.js | ||
| /.next/ | ||
| /out/ | ||
|
|
||
| # production | ||
| /build | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # debug | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # local env files | ||
| .env*.local | ||
| .env | ||
|
|
||
| # vercel | ||
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
|
|
||
| # fumadocs | ||
| .source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import { notFound } from 'next/navigation'; | ||
| import { docs } from '../../../.source/server'; | ||
|
|
||
| export const dynamicParams = false; | ||
|
|
||
| export default async function Page(props: { | ||
| params: Promise<{ slug?: string[] }>; | ||
| }) { | ||
| const params = await props.params; | ||
| const slug = params.slug || []; | ||
| const path = slug.length === 0 ? 'index.mdx' : `${slug.join('/')}.mdx`; | ||
|
|
||
| // Find the page in docs array | ||
| const page = (docs as any[]).find((doc: any) => { | ||
| const docPath = doc.path || doc.url || ''; | ||
| return docPath === path || docPath.endsWith(`/${path}`) || docPath === slug.join('/'); | ||
| }); | ||
|
|
||
| if (!page) { | ||
| console.error('Page not found for path:', path, 'Available docs:', docs); | ||
| notFound(); | ||
| } | ||
|
|
||
| const MDX = page.data?.exports?.default; | ||
| const title = page.data?.title || 'Untitled'; | ||
|
|
||
| return ( | ||
| <div className="container mx-auto px-4 py-8 max-w-4xl"> | ||
| <h1 className="text-3xl font-bold mb-4">{title}</h1> | ||
| <div className="prose prose-gray max-w-none dark:prose-invert"> | ||
| {MDX && <MDX />} | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export function generateStaticParams() { | ||
| // Manually list all documentation pages | ||
| const pages = [ | ||
| { slug: [] }, // index | ||
| { slug: ['guide'] }, | ||
| { slug: ['guide', 'architecture'] }, | ||
| { slug: ['guide', 'contributing-development'] }, | ||
| { slug: ['guide', 'data-modeling'] }, | ||
| { slug: ['guide', 'development-plan'] }, | ||
| { slug: ['guide', 'logic-actions'] }, | ||
| { slug: ['guide', 'logic-hooks'] }, | ||
| { slug: ['guide', 'platform-components'] }, | ||
| { slug: ['guide', 'sdk-reference'] }, | ||
| { slug: ['guide', 'security-guide'] }, | ||
| { slug: ['guide', 'ui-framework'] }, | ||
| { slug: ['spec'] }, | ||
| { slug: ['spec', 'http-protocol'] }, | ||
| { slug: ['spec', 'metadata-format'] }, | ||
| { slug: ['spec', 'query-language'] }, | ||
| ]; | ||
|
|
||
| return pages; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { source } from '@/lib/source'; | ||
| import type { ReactNode } from 'react'; | ||
|
|
||
| export default function Layout({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <div> | ||
| <nav className="border-b"> | ||
| <div className="container mx-auto px-4 py-4"> | ||
| <a href="/" className="text-xl font-bold">ObjectOS</a> | ||
| </div> | ||
| </nav> | ||
| <div className="container mx-auto px-4"> | ||
| <div className="flex"> | ||
| <aside className="w-64 py-8"> | ||
| {/* Sidebar navigation would go here */} | ||
| <div className="text-sm"> | ||
| <a href="/docs/guide" className="block py-1">Guide</a> | ||
| <a href="/docs/spec" className="block py-1">Specifications</a> | ||
| </div> | ||
| </aside> | ||
| <main className="flex-1"> | ||
| {children} | ||
| </main> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
|
|
||
| @layer base { | ||
| :root { | ||
| --background: 0 0% 100%; | ||
| --foreground: 222.2 84% 4.9%; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import './global.css'; | ||
| import { RootProvider } from 'fumadocs-ui/provider'; | ||
| import { Inter } from 'next/font/google'; | ||
| import type { ReactNode } from 'react'; | ||
|
|
||
| const inter = Inter({ | ||
| subsets: ['latin'], | ||
| }); | ||
|
|
||
| export default function Layout({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <html lang="en" className={inter.className} suppressHydrationWarning> | ||
| <body> | ||
| <RootProvider>{children}</RootProvider> | ||
| </body> | ||
| </html> | ||
| ); | ||
| } | ||
|
|
||
| export const metadata = { | ||
| title: { | ||
| default: 'ObjectOS', | ||
| template: '%s | ObjectOS', | ||
| }, | ||
| description: 'The Business Operating System - Orchestrate Identity, Workflows, and Local-First Sync', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import Link from 'next/link'; | ||
|
|
||
| export default function HomePage() { | ||
| return ( | ||
| <main className="flex flex-col items-center justify-center min-h-screen p-8 bg-gradient-to-b from-background to-muted/20"> | ||
| <div className="max-w-4xl mx-auto text-center space-y-8"> | ||
| <h1 className="text-6xl font-bold tracking-tight"> | ||
| Object<span className="text-primary">OS</span> | ||
| </h1> | ||
| <p className="text-2xl text-muted-foreground font-medium"> | ||
| The Business Operating System | ||
| </p> | ||
| <p className="text-xl text-muted-foreground max-w-2xl mx-auto"> | ||
| Orchestrate Identity, Workflows, and Local-First Sync in one unified runtime. | ||
| The Kernel for your Enterprise. | ||
| </p> | ||
| <div className="flex gap-4 justify-center pt-8"> | ||
| <Link | ||
| href="/docs" | ||
| className="px-8 py-3 rounded-lg bg-primary text-primary-foreground font-semibold hover:bg-primary/90 transition-colors" | ||
| > | ||
| Get Started | ||
| </Link> | ||
| <Link | ||
| href="/docs/guide/architecture" | ||
| className="px-8 py-3 rounded-lg border border-border font-semibold hover:bg-accent transition-colors" | ||
| > | ||
| Architecture | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| </main> | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Copilot Autofix
AI about 9 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, thesourcesymbol from'@/lib/source'is not referenced anywhere. The best fix that does not change existing functionality is to delete line 1 entirely, leaving only theReactNodetype import. No other code changes are needed, and no new imports or methods are required.