Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/site/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,29 @@ export default async function Page(props: {
if (!page) notFound();

const MDX = (page.data as any)._exports?.default || (page.data as any).exports?.default;
const githubPath = params.slug
? `apps/site/content/docs/${params.slug.join('/')}.mdx`
: 'apps/site/content/docs/index.mdx';
Comment on lines +15 to +17
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub edit link construction assumes all documentation files use the .mdx extension, but this may not always be accurate if some files use .md extension instead. Consider checking the actual file extension from the page metadata or handling both .md and .mdx extensions to avoid potential 404 errors when users click the "Edit this page" link.

Copilot uses AI. Check for mistakes.

return (
<DocsPage
toc={(page.data as any).toc ?? []}
full={false}
footer={{
children: (
<a
href={`https://github.com/objectstack-ai/objectos/blob/main/${githubPath}`}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub edit URL hardcodes the branch name as 'main'. If the default branch is different (e.g., 'master', 'develop') or if the project uses a different branching strategy, users will be directed to a non-existent page. Consider making the branch name configurable through an environment variable or a constant, or verify that 'main' is indeed the correct default branch for this repository.

Copilot uses AI. Check for mistakes.
target="_blank"
rel="noreferrer noopener"
className="inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors"
>
<svg className="size-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
</svg>
Comment on lines +31 to +33
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline SVG for the edit icon lacks an accessible title or aria-label attribute, which may create accessibility issues for users relying on screen readers. Consider adding an aria-label to the anchor element or using a semantic component from lucide-react (which is already a dependency) like the Edit icon for better accessibility and maintainability.

Copilot uses AI. Check for mistakes.
Edit this page on GitHub
</a>
),
}}
>
<DocsBody>
<h1>{page.data.title}</h1>
Expand Down
4 changes: 4 additions & 0 deletions apps/site/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default function Layout({ children }: { children: ReactNode }) {
<DocsLayout
tree={pageTree}
{...baseOptions}
sidebar={{
collapsible: true,
defaultOpenLevel: 0,
}}
>
{children}
</DocsLayout>
Expand Down
1 change: 1 addition & 0 deletions apps/site/app/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'tailwindcss';
@import 'fumadocs-ui/style.css';
@import 'fumadocs-twoslash/twoslash.css';

@theme {
/* Colors - using CSS custom properties */
Expand Down
3 changes: 3 additions & 0 deletions apps/site/app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const baseOptions: BaseLayoutProps = {
<span className="font-bold">ObjectOS</span>
</div>
),
transparentMode: 'top',
},
links: [
{
Expand All @@ -29,6 +30,8 @@ export const baseOptions: BaseLayoutProps = {
{
text: 'GitHub',
url: 'https://github.com/objectstack-ai/objectos',
external: true,
},
Comment on lines 30 to 34
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is duplication in the GitHub repository URL configuration. The URL 'https://github.com/objectstack-ai/objectos' appears both in the links array (line 32) and as the githubUrl property (line 36). Consider using only the githubUrl property, as fumadocs-ui can automatically generate the GitHub link in the navigation from this property, avoiding potential inconsistencies if the URL needs to be updated in the future.

Suggested change
{
text: 'GitHub',
url: 'https://github.com/objectstack-ai/objectos',
external: true,
},

Copilot uses AI. Check for mistakes.
],
githubUrl: 'https://github.com/objectstack-ai/objectos',
};
11 changes: 10 additions & 1 deletion apps/site/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={inter.className} suppressHydrationWarning>
<body>
<RootProvider>{children}</RootProvider>
<RootProvider
search={{
enabled: true,
options: {
type: 'static',
},
}}
>
{children}
</RootProvider>
</body>
</html>
);
Expand Down
2 changes: 2 additions & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
},
"dependencies": {
"fumadocs-core": "^16.4.7",
"fumadocs-docgen": "^3.0.5",
"fumadocs-mdx": "^14.2.6",
"fumadocs-twoslash": "^3.1.12",
"fumadocs-ui": "^16.4.7",
"lucide-react": "^0.562.0",
"next": "^16.1.4",
Expand Down
19 changes: 18 additions & 1 deletion apps/site/source.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { defineDocs, defineConfig, defineCollections } from 'fumadocs-mdx/config';
import { z } from 'zod';
import { remarkInstall } from 'fumadocs-docgen';
import { rehypeCodeDefaultOptions } from 'fumadocs-core/mdx-plugins';
import { transformerTwoslash } from 'fumadocs-twoslash';

export const { docs, meta } = defineDocs({
dir: 'content/docs',
Expand All @@ -16,4 +19,18 @@ export const blog = defineCollections({
type: 'doc',
});

export default defineConfig();
export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkInstall],
rehypeCodeOptions: {
themes: {
light: 'github-light',
dark: 'github-dark',
},
transformers: [
...(rehypeCodeDefaultOptions.transformers ?? []),
transformerTwoslash(),
],
},
},
Comment on lines +22 to +35
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MDX configuration introduces new plugins and transformers (remarkInstall, transformerTwoslash) with dual-theme code highlighting, but lacks inline comments or documentation explaining their purpose and behavior. Consider adding brief comments to explain what each plugin does, especially for future maintainers who may not be familiar with fumadocs ecosystem plugins. For example, explain that remarkInstall handles package manager syntax conversion and transformerTwoslash provides TypeScript hover information.

Copilot uses AI. Check for mistakes.
});
4 changes: 4 additions & 0 deletions apps/site/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const config: Config = {
'./lib/**/*.{ts,tsx}',
'./mdx-components.{ts,tsx}',
'./node_modules/fumadocs-ui/dist/**/*.js',
'./node_modules/fumadocs-twoslash/dist/**/*.js',
],
plugins: [
require('@tailwindcss/typography'),
],
};

Expand Down
Loading
Loading