File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
- import { docs , meta } from '@/.source' ;
2
1
import { createMDXSource } from 'fumadocs-mdx' ;
3
2
import { loader } from 'fumadocs-core/source' ;
3
+ import type { InferMetaType , InferPageType } from 'fumadocs-core/source' ;
4
+ import { docs , meta , blogPosts , pagesPosts } from '@/.source' ;
4
5
5
6
export const source = loader ( {
6
7
baseUrl : '/docs' ,
7
- source : createMDXSource ( docs , meta ) ,
8
+ source : createMDXSource ( docs , meta )
8
9
} ) ;
10
+
11
+ export const blog = loader ( {
12
+ baseUrl : '/blog' ,
13
+ source : createMDXSource ( blogPosts , [ ] ) ,
14
+ } ) ;
15
+
16
+ export const pageLists = loader ( {
17
+ baseUrl : '/pages' ,
18
+ source : createMDXSource ( pagesPosts , [ ] )
19
+ } ) ;
20
+
21
+ export type DocsPage = InferPageType < typeof source > ;
22
+ export type DocsMeta = InferMetaType < typeof source > ;
23
+ export type BlogPage = InferPageType < typeof blog > ;
24
+ export type BlogMeta = InferMetaType < typeof blog > ;
25
+ export type PagesType = InferPageType < typeof pageLists > ;
26
+ export type PagesMeta = InferMetaType < typeof pageLists > ;
You can’t perform that action at this time.
0 commit comments