Skip to content

Commit d045f9a

Browse files
authored
Merge pull request #54 from objectstack-ai/copilot/install-fumadocs-framework
2 parents c6fbb0a + 734e3b5 commit d045f9a

4 files changed

Lines changed: 1188 additions & 3 deletions

File tree

‎package.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@
1212
"test": "pnpm -r test"
1313
},
1414
"dependencies": {
15+
"@fumadocs/cli": "^1.2.2",
1516
"client-only": "^0.0.1",
1617
"fumadocs-core": "16.4.7",
1718
"fumadocs-mdx": "14.2.5",
19+
"fumadocs-openapi": "^10.2.6",
20+
"fumadocs-twoslash": "^3.1.12",
21+
"fumadocs-typescript": "^5.0.1",
1822
"fumadocs-ui": "16.4.7",
23+
"katex": "^0.16.27",
1924
"lucide-react": "^0.562.0",
2025
"next": "16.1.2",
2126
"react": "^19.2.3",
2227
"react-dom": "^19.2.3",
28+
"rehype-katex": "^7.0.1",
2329
"remark-directive": "^4.0.0",
30+
"remark-gfm": "^4.0.1",
31+
"remark-math": "^6.0.0",
2432
"server-only": "^0.0.1",
2533
"tailwind-merge": "^3.4.0"
2634
},

‎packages/site/app/layout.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'fumadocs-ui/style.css';
2+
import 'katex/dist/katex.min.css';
23
import { RootProvider } from 'fumadocs-ui/provider/next';
34
import { defineI18nUI } from 'fumadocs-ui/i18n';
45
import { i18n } from '@/lib/i18n';

‎packages/site/source.config.ts‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import path from 'node:path';
44
import fs from 'node:fs';
55
import remarkDirective from 'remark-directive';
66
import { remarkDirectiveAdmonition } from 'fumadocs-core/mdx-plugins';
7+
import remarkGfm from 'remark-gfm';
8+
import remarkMath from 'remark-math';
9+
import rehypeKatex from 'rehype-katex';
10+
import { transformerTwoslash } from 'fumadocs-twoslash';
711

812
function resolveContentDir(dir: string) {
913
if (process.env.DOCS_DIR && dir === 'content/docs') return process.env.DOCS_DIR;
@@ -26,9 +30,20 @@ export const { docs, meta } = defineDocs({
2630

2731
export default defineConfig({
2832
mdxOptions: {
29-
remarkPlugins: [remarkDirective, remarkDirectiveAdmonition],
33+
remarkPlugins: [
34+
remarkDirective,
35+
remarkDirectiveAdmonition,
36+
remarkGfm, // GitHub Flavored Markdown (tables, strikethrough, etc.)
37+
remarkMath, // Math support (LaTeX equations)
38+
],
39+
rehypePlugins: [
40+
rehypeKatex, // Render math equations
41+
],
3042
rehypeCodeOptions: {
3143
theme: siteConfig.content.codeBlock.theme,
44+
transformers: [
45+
transformerTwoslash(), // Interactive TypeScript code examples
46+
],
3247
}
3348
}
3449
});

0 commit comments

Comments
 (0)