mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 23:49:51 +00:00
MDX: hotfix Windows path escape
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-mdx': patch
|
||||
---
|
||||
|
||||
hotfix Windows path escape
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
MetaCollectionItem,
|
||||
} from '@/config/build';
|
||||
import path from 'path';
|
||||
import { type CodeGen, createCodegen, ident } from '@/utils/codegen';
|
||||
import { type CodeGen, createCodegen, ident, slash } from '@/utils/codegen';
|
||||
import { glob } from 'tinyglobby';
|
||||
import { createFSCache } from '@/utils/fs-cache';
|
||||
import { createHash } from 'crypto';
|
||||
@@ -377,7 +377,7 @@ async function generateBrowserIndexFile(ctx: FileGenContext) {
|
||||
}
|
||||
|
||||
function getBase(collection: CollectionItem) {
|
||||
return path.relative(process.cwd(), collection.dir);
|
||||
return slash(path.relative(process.cwd(), collection.dir));
|
||||
}
|
||||
|
||||
function generateDocCollectionFrontmatterGlob(
|
||||
|
||||
@@ -42,7 +42,7 @@ export async function dynamic<Config, TC extends InternalTypeConfig>(
|
||||
|
||||
function convertLazyEntries(
|
||||
collection: DocCollectionItem,
|
||||
entries: LazyEntry<unknown>[],
|
||||
entries: LazyEntry[],
|
||||
) {
|
||||
const head: Record<string, () => unknown> = {};
|
||||
const body: Record<string, () => Promise<unknown>> = {};
|
||||
|
||||
Reference in New Issue
Block a user