mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Core: Remove deprecated export
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'fumadocs-core': major
|
||||
---
|
||||
|
||||
**Remove deprecated `fumadocs-core/middleware` export**
|
||||
|
||||
**migrate:** Use `fumadocs-core/i18n`.
|
||||
@@ -52,10 +52,6 @@
|
||||
"import": "./dist/link.js",
|
||||
"types": "./dist/link.d.ts"
|
||||
},
|
||||
"./middleware": {
|
||||
"import": "./dist/middleware.js",
|
||||
"types": "./dist/middleware.d.ts"
|
||||
},
|
||||
"./mdx-plugins": {
|
||||
"import": "./dist/mdx-plugins/index.js",
|
||||
"types": "./dist/mdx-plugins/index.d.ts"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
// TODO: Remove this export (major)
|
||||
export * from './i18n/middleware';
|
||||
@@ -9,10 +9,7 @@ import {
|
||||
export interface MetaFile {
|
||||
file: FileInfo;
|
||||
format: 'meta';
|
||||
data: {
|
||||
// TODO: Merge it into data (major)
|
||||
data: MetaData;
|
||||
};
|
||||
data: MetaData;
|
||||
}
|
||||
|
||||
export interface PageFile {
|
||||
|
||||
@@ -301,7 +301,7 @@ function createOutput(options: LoaderOptions): LoaderOutput<LoaderConfig> {
|
||||
function fileToMeta<Data = MetaData>(file: MetaFile): Meta<Data> {
|
||||
return {
|
||||
file: file.file,
|
||||
data: file.data.data as Data,
|
||||
data: file.data as Data,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ function buildFolderNode(
|
||||
'page',
|
||||
);
|
||||
|
||||
const metadata = meta?.data.data;
|
||||
const metadata = meta?.data;
|
||||
const index = indexFile ? buildFileNode(indexFile, ctx) : undefined;
|
||||
|
||||
let children: PageTree.Node[];
|
||||
|
||||
@@ -12,7 +12,6 @@ export default defineConfig({
|
||||
'src/search/server.ts',
|
||||
'src/search/algolia.ts',
|
||||
'src/utils/use-on-change.ts',
|
||||
'src/middleware.ts',
|
||||
'src/i18n/index.ts',
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user