Skip to content

Commit bf45b74

Browse files
committed
feat(programs/config): Add programs source loader and update imports
1 parent bdca874 commit bf45b74

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

source.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ export const docs = defineDocs({
1616
},
1717
});
1818

19+
export const programs = defineDocs({
20+
dir: "content/programs",
21+
docs: {
22+
schema: frontmatterSchema,
23+
},
24+
meta: {
25+
schema: metaSchema,
26+
},
27+
});
28+
1929
export default defineConfig({
2030
mdxOptions: {
2131
// MDX options

src/lib/source.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { docs } from "@/.source";
1+
import { docs, programs } from "@/.source";
22
import { loader } from "fumadocs-core/source";
33
import { icons } from "lucide-react";
44
import { createElement } from "react";
@@ -16,3 +16,8 @@ export const source = loader({
1616
if (icon in icons) return createElement(icons[icon as keyof typeof icons]);
1717
},
1818
});
19+
20+
export const programsSource = loader({
21+
baseUrl: "/programs",
22+
source: programs.toFumadocsSource(),
23+
});

0 commit comments

Comments
 (0)