mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 23:49:51 +00:00
MDX: Fix non-absolute dir option
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-mdx': patch
|
||||
---
|
||||
|
||||
Fix non-absolute `dir` option
|
||||
@@ -52,7 +52,7 @@ Configure Fumadocs MDX by creating a `source.config.ts` file.
|
||||
import { defineDocs } from 'fumadocs-mdx/config';
|
||||
|
||||
export const { docs, meta } = defineDocs({
|
||||
dir: '/content/docs',
|
||||
dir: 'content/docs',
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ export function defineDocs<
|
||||
/**
|
||||
* The directory to scan files
|
||||
*
|
||||
* @defaultValue '/content/docs'
|
||||
* @defaultValue 'content/docs'
|
||||
*/
|
||||
dir?: string | string[];
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ async function getCollectionFiles(
|
||||
await Promise.all(
|
||||
dirs.map(async (dir) => {
|
||||
const result = await fg(collection.files ?? '**/*', {
|
||||
cwd: dir,
|
||||
cwd: path.resolve(dir),
|
||||
absolute: true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user