Adds notes.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
ObsidianDocumentSchema,
|
||||
ObsidianMdLoader,
|
||||
} from "astro-loader-obsidian";
|
||||
import { glob } from "astro/loaders";
|
||||
import { defineCollection, z } from "astro:content";
|
||||
|
||||
@@ -26,4 +30,15 @@ const page = defineCollection({
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog, page };
|
||||
const notes = defineCollection({
|
||||
loader: ObsidianMdLoader({
|
||||
base: "src/content/notes",
|
||||
url: "notes",
|
||||
}),
|
||||
schema: ({ image }) =>
|
||||
ObsidianDocumentSchema.extend({
|
||||
image: image().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog, page, notes };
|
||||
|
||||
Reference in New Issue
Block a user