mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
Docs: Improve Fumadocs MDX section
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@fumadocs/content-collections': patch
|
||||
'@fumadocs/mdx-remote': patch
|
||||
'fumadocs-typescript': patch
|
||||
'fumadocs-twoslash': patch
|
||||
'fumadocs-docgen': patch
|
||||
'fumadocs-openapi': patch
|
||||
'fumadocs-core': patch
|
||||
'fumadocs-mdx': patch
|
||||
'fumadocs-ui': patch
|
||||
---
|
||||
|
||||
Bump deps
|
||||
@@ -8,7 +8,7 @@ import { cn } from '@/utils/cn';
|
||||
import { modes } from '@/utils/modes';
|
||||
|
||||
const itemVariants = cva(
|
||||
'rounded-md px-2 py-1 transition-colors hover:text-fd-accent-foreground',
|
||||
'rounded-full px-2 py-1 transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground',
|
||||
{
|
||||
variants: {
|
||||
active: {
|
||||
@@ -36,7 +36,7 @@ export function NavChildren(): React.ReactElement {
|
||||
const mode = useMode();
|
||||
|
||||
return (
|
||||
<div className="rounded-md border bg-fd-muted/80 p-1 text-sm text-fd-muted-foreground max-md:absolute max-md:left-1/2 max-md:-translate-x-1/2">
|
||||
<div className="rounded-full border bg-fd-muted p-0.5 text-sm text-fd-muted-foreground max-md:absolute max-md:left-1/2 max-md:-translate-x-1/2">
|
||||
{modes.map((m) => (
|
||||
<Link
|
||||
key={m.param}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
---
|
||||
title: Collections
|
||||
description: Collection of content data for your app
|
||||
---
|
||||
|
||||
## Define Collections
|
||||
|
||||
Define a collection to parse a certain set of files.
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: z.object({
|
||||
// allowed...
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
```json doc-gen:typescript
|
||||
{
|
||||
"file": "./content/docs/mdx/props.ts",
|
||||
"name": "Collections"
|
||||
}
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
#### `dir`
|
||||
|
||||
Directories to scan input files.
|
||||
|
||||
#### Schema
|
||||
|
||||
The Zod schema to validate file data (frontmatter on `doc` type, content on `meta` type).
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: z.object({
|
||||
name: z.string(),
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
You can add additional properties to the output.
|
||||
Note that the validation is done by build time, hence the output must be serializable.
|
||||
|
||||
You can also pass a function and receives the transform context.
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: (ctx) => {
|
||||
return z.object({
|
||||
name: z.string(),
|
||||
testPath: z.string().default(ctx.path),
|
||||
});
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Type
|
||||
|
||||
The accepted type of collection.
|
||||
|
||||
| Type | Description |
|
||||
| ------ | ---------------------- |
|
||||
| `meta` | JSON/YAML File |
|
||||
| `doc` | Markdown/MDX Documents |
|
||||
|
||||
#### MDX Options
|
||||
|
||||
You can also customise MDX options from collections.
|
||||
Notice that passing `mdxOptions` to collection overrides all defaults from global config.
|
||||
|
||||
```ts
|
||||
import { defineCollections, getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
mdxOptions: getDefaultMDXOptions({
|
||||
// mdx options
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
We use `getDefaultMDXOptions` to apply default MDX options, it accepts the [Default MDX Options](/docs/mdx/mdx).
|
||||
|
||||
For full control over MDX options, you can pass MDX options without `getDefaultMDXOptions`, which means no defaults will be applied (except the ones from MDX.js).
|
||||
|
||||
> This API only available on `doc` type.
|
||||
|
||||
#### Transform
|
||||
|
||||
A function to perform runtime transformation on collection entries.
|
||||
|
||||
See [Transform](/docs/mdx/transform).
|
||||
|
||||
## Define Docs
|
||||
|
||||
You can use `defineDocs` to define the required collections to work with Fumadocs.
|
||||
It offers the same API as `defineCollections`.
|
||||
|
||||
```ts
|
||||
import { defineDocs } from 'fumadocs-mdx/config';
|
||||
|
||||
export const { docs, meta } = defineDocs({
|
||||
docs: {
|
||||
// optional, you can pass options to each collection
|
||||
},
|
||||
meta: {
|
||||
// optional, you can pass options to each collection
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
The `docs` and `meta` are collections on their own.
|
||||
You can pass collection options to them as shown above.
|
||||
|
||||
### Extend `schema`
|
||||
|
||||
You can extend the default Zod schema of `docs` and `meta`.
|
||||
|
||||
```ts
|
||||
import { frontmatterSchema, metaSchema, defineDocs } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const { docs, meta } = defineDocs({
|
||||
docs: {
|
||||
schema: frontmatterSchema.extend({
|
||||
index: z.boolean().default(false),
|
||||
}),
|
||||
},
|
||||
meta: {
|
||||
schema: metaSchema.extend({
|
||||
// other props
|
||||
}),
|
||||
},
|
||||
});
|
||||
```
|
||||
@@ -1,293 +0,0 @@
|
||||
---
|
||||
title: Configuration
|
||||
description: Learn to configure Fumadocs MDX
|
||||
icon: Paperclip
|
||||
---
|
||||
|
||||
## Configuration File
|
||||
|
||||
Configure Fumadocs MDX by creating a `source.config.ts` file.
|
||||
|
||||
### Global Options
|
||||
|
||||
Shared options of Fumadocs MDX.
|
||||
|
||||
```ts title="source.config.ts"
|
||||
import { defineConfig } from 'fumadocs-mdx/config';
|
||||
|
||||
export default defineConfig({
|
||||
// global options
|
||||
});
|
||||
```
|
||||
|
||||
```json doc-gen:typescript
|
||||
{
|
||||
"file": "./content/docs/mdx/props.ts",
|
||||
"name": "GlobalConfig"
|
||||
}
|
||||
```
|
||||
|
||||
#### MDX Options
|
||||
|
||||
Customise the default MDX options of all MDX files.
|
||||
|
||||
See [Default MDX Options](#default-mdx-options) for more details.
|
||||
|
||||
#### Manifest
|
||||
|
||||
Enable the `generateManifest` option to generate a manifest file for production builds.
|
||||
|
||||
See [Manifest](/docs/mdx/manifest) to learn more.
|
||||
|
||||
### Collections
|
||||
|
||||
Define a collection to parse a certain set of files.
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: z.object({
|
||||
// allowed...
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
```json doc-gen:typescript
|
||||
{
|
||||
"file": "./content/docs/mdx/props.ts",
|
||||
"name": "Collections"
|
||||
}
|
||||
```
|
||||
|
||||
#### `dir`
|
||||
|
||||
Directories to scan input files.
|
||||
|
||||
#### Schema
|
||||
|
||||
The Zod schema to validate file data (frontmatter on `doc` type, content on `meta` type).
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: z.object({
|
||||
name: z.string(),
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
You can add additional properties to the output.
|
||||
Note that the validation is done by build time, hence the output must be serializable.
|
||||
|
||||
You can also pass a function and receives the transform context.
|
||||
|
||||
```ts
|
||||
import { defineCollections } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
dir: './content/blog',
|
||||
schema: (ctx) => {
|
||||
return z.object({
|
||||
name: z.string(),
|
||||
testPath: z.string().default(ctx.path),
|
||||
});
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Type
|
||||
|
||||
The accepted type of collection.
|
||||
|
||||
| Type | Description |
|
||||
| ------ | ---------------------- |
|
||||
| `meta` | JSON/YAML File |
|
||||
| `doc` | Markdown/MDX Documents |
|
||||
|
||||
#### MDX Options
|
||||
|
||||
You can also customise MDX options from collections.
|
||||
Notice that passing `mdxOptions` to collection overrides all defaults from global config.
|
||||
|
||||
```ts
|
||||
import { defineCollections, getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
export const blog = defineCollections({
|
||||
type: 'doc',
|
||||
mdxOptions: getDefaultMDXOptions({
|
||||
// mdx options
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
We use `getDefaultMDXOptions` to apply default MDX options, it accepts the [Default MDX Options](#default-mdx-options).
|
||||
|
||||
For full control over MDX options, you can pass MDX options without `getDefaultMDXOptions`, which means no defaults will be applied (except the ones from MDX.js).
|
||||
|
||||
> This API only available on `doc` type.
|
||||
|
||||
#### Transform
|
||||
|
||||
A function to perform runtime transformation on collection entries.
|
||||
|
||||
See [Transform](/docs/mdx/transform).
|
||||
|
||||
### Define Docs
|
||||
|
||||
You can use `defineDocs` to define the required collections to work with Fumadocs.
|
||||
It offers the same API as `defineCollections`.
|
||||
|
||||
```ts
|
||||
import { defineDocs } from 'fumadocs-mdx/config';
|
||||
|
||||
export const { docs, meta } = defineDocs({
|
||||
docs: {
|
||||
// optional, you can pass options to each collection
|
||||
},
|
||||
meta: {
|
||||
// optional, you can pass options to each collection
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Extend `schema`
|
||||
|
||||
You can extend the default Zod schema of `docs` and `meta`.
|
||||
|
||||
```ts
|
||||
import { frontmatterSchema, metaSchema, defineDocs } from 'fumadocs-mdx/config';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const { docs, meta } = defineDocs({
|
||||
docs: {
|
||||
schema: frontmatterSchema.extend({
|
||||
index: z.boolean().default(false),
|
||||
}),
|
||||
},
|
||||
meta: {
|
||||
schema: metaSchema.extend({
|
||||
// other props
|
||||
}),
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## Default MDX Options
|
||||
|
||||
Fumadocs MDX uses the [MDX Compiler](https://mdxjs.com/packages/mdx) to compile MDX files into JavaScript files.
|
||||
|
||||
Since some options should be applied by default, it exposes a `getDefaultMDXOptions` function that applies these defaults on the input MDX options.
|
||||
|
||||
To allow changing the default settings, it supports a different set of options.
|
||||
|
||||
> MDX options from global config are always applied automatically.
|
||||
|
||||
### Remark Plugins
|
||||
|
||||
These plugins are applied by default:
|
||||
|
||||
- [Remark Image](/docs/headless/mdx/remark-image) - Handle images
|
||||
- [Remark Heading](/docs/headless/mdx/toc) - Extract table of contents
|
||||
- [Remark Structure](/docs/headless/mdx/structure) - Generate search indexes
|
||||
- Remark Exports - Exports the output generated by remark plugins above
|
||||
|
||||
You can add other remark plugins with:
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './remark-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
remarkPlugins: [myPlugin],
|
||||
});
|
||||
```
|
||||
|
||||
You can also pass a function to control the order of remark plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './remark-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
remarkPlugins: (v) => [myPlugin, ...v],
|
||||
});
|
||||
```
|
||||
|
||||
### Rehype Plugins
|
||||
|
||||
These plugins are applied by default:
|
||||
|
||||
- [Rehype Code](/docs/headless/mdx/rehype-code) - Syntax highlighting
|
||||
|
||||
Same as remark plugins, you can pass an array or a function to add other rehype plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './rehype-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
rehypePlugins: (v) => [myPlugin, ...v],
|
||||
});
|
||||
```
|
||||
|
||||
### Customise Built-in Plugins
|
||||
|
||||
Customise the options of built-in plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
rehypeCodeOptions: {
|
||||
// options
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### Export Properties from `vfile.data`
|
||||
|
||||
Some remark plugins store their output in `vfile.data` (an compile-time memory) which cannot be accessed from your code.
|
||||
Fumadocs MDX applies a remark plugin that turns `vfile.data` properties into exports, so that you can access these properties when importing the MDX file.
|
||||
|
||||
You can define additional properties to be exported.
|
||||
|
||||
```js
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
valueToExport: ['dataName'],
|
||||
});
|
||||
```
|
||||
|
||||
By default, it includes:
|
||||
|
||||
- `toc` for the Remark Heading plugin
|
||||
- `structuredData` for the Remark Structure Plugin
|
||||
- `frontmatter` for the frontmatter of MDX (using `gray-matter`)
|
||||
|
||||
## Plugin Options
|
||||
|
||||
Fumadocs MDX offers loaders and a Fumadocs [Source API](/docs/headless/source-api) adapter to integrate with Fumadocs.
|
||||
You can configure the plugin by passing options to `createMDX` in `next.config.mjs`.
|
||||
|
||||
### Config Path
|
||||
|
||||
Customise the path of config file.
|
||||
|
||||
```ts
|
||||
import { createMDX } from 'fumadocs-mdx/next';
|
||||
|
||||
const withMDX = createMDX({
|
||||
configPath: './my-config.ts',
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Global Options
|
||||
description: Customise Fumadocs MDX
|
||||
---
|
||||
|
||||
## Global Options
|
||||
|
||||
Shared options of Fumadocs MDX.
|
||||
|
||||
```ts title="source.config.ts"
|
||||
import { defineConfig } from 'fumadocs-mdx/config';
|
||||
|
||||
export default defineConfig({
|
||||
// global options
|
||||
});
|
||||
```
|
||||
|
||||
```json doc-gen:typescript
|
||||
{
|
||||
"file": "./content/docs/mdx/props.ts",
|
||||
"name": "GlobalConfig"
|
||||
}
|
||||
```
|
||||
|
||||
#### MDX Options
|
||||
|
||||
Customise the default MDX options of all MDX files.
|
||||
|
||||
See [Default MDX Options](#default-mdx-options) for more details.
|
||||
|
||||
#### Manifest
|
||||
|
||||
Enable the `generateManifest` option to generate a manifest file for production builds.
|
||||
|
||||
See [Manifest](/docs/mdx/manifest) to learn more.
|
||||
@@ -45,7 +45,7 @@ The Next.js config must be a `.mjs` file since Fumadocs is ESM-only.
|
||||
|
||||
</Callout>
|
||||
|
||||
To configure Fumadocs MDX, create a config file.
|
||||
Configure Fumadocs MDX by creating a `source.config.ts` file.
|
||||
|
||||
```ts title="source.config.ts"
|
||||
import { defineDocs } from 'fumadocs-mdx/config';
|
||||
@@ -139,4 +139,4 @@ export default defineConfig({
|
||||
});
|
||||
```
|
||||
|
||||
See [Configuration](/docs/mdx/configuration) to learn more.
|
||||
See [MDX Options](/docs/mdx/mdx) to learn more.
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
title: MDX Options
|
||||
description: Configure MDX processor for Fumadocs MDX
|
||||
---
|
||||
|
||||
## Default MDX Options
|
||||
|
||||
Fumadocs MDX uses the [MDX Compiler](https://mdxjs.com/packages/mdx) to compile MDX files into JavaScript files.
|
||||
|
||||
Since some options should be applied by default, it exposes a `getDefaultMDXOptions` function that applies these defaults on the input MDX options.
|
||||
|
||||
To allow changing the default settings, it supports a different set of options.
|
||||
|
||||
> MDX options from global config are always applied automatically.
|
||||
|
||||
### Remark Plugins
|
||||
|
||||
These plugins are applied by default:
|
||||
|
||||
- [Remark Image](/docs/headless/mdx/remark-image) - Handle images
|
||||
- [Remark Heading](/docs/headless/mdx/toc) - Extract table of contents
|
||||
- [Remark Structure](/docs/headless/mdx/structure) - Generate search indexes
|
||||
- Remark Exports - Exports the output generated by remark plugins above
|
||||
|
||||
You can add other remark plugins with:
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './remark-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
remarkPlugins: [myPlugin],
|
||||
});
|
||||
```
|
||||
|
||||
You can also pass a function to control the order of remark plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './remark-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
remarkPlugins: (v) => [myPlugin, ...v],
|
||||
});
|
||||
```
|
||||
|
||||
### Rehype Plugins
|
||||
|
||||
These plugins are applied by default:
|
||||
|
||||
- [Rehype Code](/docs/headless/mdx/rehype-code) - Syntax highlighting
|
||||
|
||||
Same as remark plugins, you can pass an array or a function to add other rehype plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
import { myPlugin } from './rehype-plugin';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
rehypePlugins: (v) => [myPlugin, ...v],
|
||||
});
|
||||
```
|
||||
|
||||
### Customise Built-in Plugins
|
||||
|
||||
Customise the options of built-in plugins.
|
||||
|
||||
```ts
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
rehypeCodeOptions: {
|
||||
// options
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### Export Properties from `vfile.data`
|
||||
|
||||
Some remark plugins store their output in `vfile.data` (an compile-time memory) which cannot be accessed from your code.
|
||||
Fumadocs MDX applies a remark plugin that turns `vfile.data` properties into exports, so that you can access these properties when importing the MDX file.
|
||||
|
||||
You can define additional properties to be exported.
|
||||
|
||||
```js
|
||||
import { getDefaultMDXOptions } from 'fumadocs-mdx/config';
|
||||
|
||||
getDefaultMDXOptions({
|
||||
valueToExport: ['dataName'],
|
||||
});
|
||||
```
|
||||
|
||||
By default, it includes:
|
||||
|
||||
- `toc` for the Remark Heading plugin
|
||||
- `structuredData` for the Remark Structure Plugin
|
||||
- `frontmatter` for the frontmatter of MDX (using `gray-matter`)
|
||||
@@ -5,6 +5,11 @@
|
||||
"---Guide---",
|
||||
"index",
|
||||
"...",
|
||||
"---Configuration---",
|
||||
"collections",
|
||||
"global",
|
||||
"mdx",
|
||||
"plugin",
|
||||
"---Features---",
|
||||
"last-modified",
|
||||
"image",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Next.js
|
||||
description: Customise the Next.js loader
|
||||
---
|
||||
|
||||
## Plugin Options
|
||||
|
||||
Fumadocs MDX offers loaders and a Fumadocs [Source API](/docs/headless/source-api) adapter to integrate with Fumadocs.
|
||||
You can configure the plugin by passing options to `createMDX` in `next.config.mjs`.
|
||||
|
||||
### Config Path
|
||||
|
||||
Customise the path of config file.
|
||||
|
||||
```ts
|
||||
import { createMDX } from 'fumadocs-mdx/next';
|
||||
|
||||
const withMDX = createMDX({
|
||||
configPath: './my-config.ts',
|
||||
});
|
||||
```
|
||||
+10
-10
@@ -14,11 +14,11 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/env": "^14.2.8",
|
||||
"@next/env": "^14.2.11",
|
||||
"@radix-ui/react-popover": "^1.1.1",
|
||||
"@radix-ui/react-tooltip": "^1.1.2",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"@shikijs/transformers": "^1.16.2",
|
||||
"@shikijs/transformers": "^1.17.5",
|
||||
"algoliasearch": "^4.24.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"fumadocs-core": "workspace:*",
|
||||
@@ -31,21 +31,21 @@
|
||||
"geist": "^1.3.1",
|
||||
"hast-util-to-jsx-runtime": "^2.3.0",
|
||||
"katex": "^0.16.11",
|
||||
"lucide-react": "^0.438.0",
|
||||
"next": "^14.2.8",
|
||||
"lucide-react": "^0.441.0",
|
||||
"next": "^14.2.11",
|
||||
"phenomenon": "^1.6.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"rehype-katex": "^7.0.1",
|
||||
"remark-math": "^6.0.0",
|
||||
"satori": "^0.10.14",
|
||||
"shiki": "^1.16.2",
|
||||
"shiki": "^1.17.5",
|
||||
"tailwind-merge": "^2.5.2",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^14.2.8",
|
||||
"@next/eslint-plugin-next": "^14.2.8",
|
||||
"@next/bundle-analyzer": "^14.2.11",
|
||||
"@next/eslint-plugin-next": "^14.2.11",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.5.4",
|
||||
"@types/react": "^18.3.5",
|
||||
@@ -55,11 +55,11 @@
|
||||
"glslify": "^7.1.1",
|
||||
"glslx": "^0.3.0",
|
||||
"postcss": "^8.4.45",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"tsconfig": "workspace:*",
|
||||
"tsx": "^4.19.0",
|
||||
"typescript": "^5.5.4",
|
||||
"tsx": "^4.19.1",
|
||||
"typescript": "^5.6.2",
|
||||
"webpack": "^5.90.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
"@fumadocs/content-collections": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@content-collections/core": "^0.6.4",
|
||||
"@content-collections/mdx": "^0.1.3",
|
||||
"@content-collections/next": "^0.2.0",
|
||||
"@content-collections/core": "^0.7.0",
|
||||
"@content-collections/mdx": "^0.1.5",
|
||||
"@content-collections/next": "^0.2.1",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"fumadocs-core": "workspace:*",
|
||||
"fumadocs-mdx": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
@@ -19,6 +19,6 @@
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"fumadocs-core": "workspace:*",
|
||||
"fumadocs-mdx": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
@@ -19,6 +19,6 @@
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
"fumadocs-mdx": "workspace:*",
|
||||
"fumadocs-openapi": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"postcss": "^8.4.45",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -25,6 +25,6 @@
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"@fumadocs/mdx-remote": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
@@ -19,6 +19,6 @@
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -19,18 +19,18 @@
|
||||
"prettier": "@vercel/style-guide/prettier",
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
||||
"@typescript-eslint/parser": "^8.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
||||
"@typescript-eslint/parser": "^8.5.0",
|
||||
"@vercel/style-guide": "^6.0.0",
|
||||
"concurrently": "^9.0.0",
|
||||
"concurrently": "^9.0.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-tailwindcss": "^3.17.4",
|
||||
"prettier": "^3.3.3",
|
||||
"rimraf": "^6.0.1",
|
||||
"tsup": "8.2.4",
|
||||
"turbo": "2.1.1",
|
||||
"typescript": "^5.5.4",
|
||||
"vitest": "^2.0.5"
|
||||
"turbo": "2.1.2",
|
||||
"typescript": "^5.6.2",
|
||||
"vitest": "^2.1.0"
|
||||
},
|
||||
"packageManager": "[email protected]",
|
||||
"engines": {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.1",
|
||||
"tsconfig": "workspace:*",
|
||||
"tsx": "^4.19.0"
|
||||
"tsx": "^4.19.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@content-collections/core": "^0.7.0",
|
||||
"@content-collections/mdx": "^0.1.3",
|
||||
"@content-collections/mdx": "^0.1.5",
|
||||
"@types/node": "22.5.4",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
|
||||
@@ -127,18 +127,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@formatjs/intl-localematcher": "^0.5.4",
|
||||
"@shikijs/rehype": "^1.16.2",
|
||||
"@shikijs/transformers": "^1.16.2",
|
||||
"@shikijs/rehype": "^1.17.5",
|
||||
"@shikijs/transformers": "^1.17.5",
|
||||
"flexsearch": "0.7.21",
|
||||
"github-slugger": "^2.0.0",
|
||||
"image-size": "^1.1.1",
|
||||
"negotiator": "^0.6.3",
|
||||
"npm-to-yarn": "^3.0.0",
|
||||
"react-remove-scroll": "^2.5.10",
|
||||
"react-remove-scroll": "^2.6.0",
|
||||
"remark": "^15.0.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"scroll-into-view-if-needed": "^3.1.0",
|
||||
"shiki": "^1.16.2",
|
||||
"shiki": "^1.17.5",
|
||||
"swr": "^2.2.5",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
},
|
||||
@@ -157,7 +157,7 @@
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"mdast-util-mdx-jsx": "^3.1.3",
|
||||
"mdast-util-mdxjs-esm": "^2.0.1",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"remark-mdx": "^3.0.1",
|
||||
"tsconfig": "workspace:*",
|
||||
"unified": "^11.0.5"
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@content-collections/core": "^0.7.0",
|
||||
"@content-collections/mdx": "^0.1.3",
|
||||
"@content-collections/next": "^0.2.0",
|
||||
"@content-collections/mdx": "^0.1.5",
|
||||
"@content-collections/next": "^0.2.1",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.5.4",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"postcss": "^8.4.45",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"typescript": "^5.5.4"
|
||||
"tailwindcss": "^3.4.11",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"remark": "^15.0.0",
|
||||
"tsconfig": "workspace:*",
|
||||
"typescript": "^5.5.4",
|
||||
"typescript": "^5.6.2",
|
||||
"unified": "^11.0.5",
|
||||
"vfile": "^6.0.3"
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^3.0.1",
|
||||
"bufferutil": "^4.0.8",
|
||||
"chokidar": "^3.6.0",
|
||||
"chokidar": "^4.0.0",
|
||||
"fast-glob": "^3.3.1",
|
||||
"gray-matter": "^4.0.3",
|
||||
"micromatch": "^4.0.8",
|
||||
@@ -77,7 +77,7 @@
|
||||
"@types/ws": "^8.5.12",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"tsconfig": "workspace:*",
|
||||
"unified": "^11.0.5",
|
||||
"vfile": "^6.0.3"
|
||||
|
||||
@@ -23,7 +23,7 @@ export type WebSocketServerMessage = UpdateMessage;
|
||||
* Create MDX Remote development server
|
||||
*/
|
||||
export function createServer({
|
||||
files = ['./content/**/*'],
|
||||
files = ['./content'],
|
||||
port = 3001,
|
||||
}: ServerOptions): void {
|
||||
const wss = new WebSocketServer({
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^3.0.1",
|
||||
"chokidar": "^3.6.0",
|
||||
"chokidar": "^4.0.0",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"esbuild": "^0.23.1",
|
||||
"estree-util-value-to-estree": "^3.1.2",
|
||||
@@ -69,7 +69,7 @@
|
||||
"@types/react": "^18.3.5",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"tsconfig": "workspace:*",
|
||||
"unified": "^11.0.5",
|
||||
"webpack": "^5.90.3"
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
"github-slugger": "^2.0.0",
|
||||
"hast-util-to-jsx-runtime": "^2.3.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lucide-react": "^0.438.0",
|
||||
"lucide-react": "^0.441.0",
|
||||
"openapi-sampler": "^1.5.1",
|
||||
"react-hook-form": "^7.53.0",
|
||||
"remark": "^15.0.1",
|
||||
"remark-rehype": "^11.1.0",
|
||||
"shiki": "^1.16.2",
|
||||
"shiki": "^1.17.5",
|
||||
"swr": "^2.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -77,7 +77,7 @@
|
||||
"@types/react": "^18.3.5",
|
||||
"bunchee": "^5.4.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"next": "^14.2.8",
|
||||
"next": "^14.2.11",
|
||||
"openapi-types": "^12.1.3",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-popover": "^1.1.1",
|
||||
"@shikijs/twoslash": "^1.16.2",
|
||||
"@shikijs/twoslash": "^1.17.5",
|
||||
"mdast-util-from-markdown": "^2.0.1",
|
||||
"mdast-util-gfm": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.2.0",
|
||||
@@ -52,8 +52,8 @@
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"postcss": "^8.4.45",
|
||||
"postcss-lightningcss": "^1.0.1",
|
||||
"shiki": "^1.16.2",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"shiki": "^1.17.5",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"tsconfig": "workspace:*",
|
||||
"typescript": "^5.5.4"
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
|
||||
@@ -81,17 +81,17 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@algolia/client-search": "^4.24.0",
|
||||
"@next/eslint-plugin-next": "^14.2.8",
|
||||
"@next/eslint-plugin-next": "^14.2.11",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"algoliasearch": "^4.24.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"lucide-react": "^0.438.0",
|
||||
"next": "^14.2.8",
|
||||
"lucide-react": "^0.441.0",
|
||||
"next": "^14.2.11",
|
||||
"postcss": "^8.4.45",
|
||||
"postcss-cli": "^11.0.0",
|
||||
"postcss-lightningcss": "^1.0.1",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
Generated
+960
-1081
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user