Adds notes.

This commit is contained in:
2026-04-21 15:39:16 -07:00
parent 1e5d1f13e8
commit 81c912e3ff
14 changed files with 1525 additions and 830 deletions

View File

@@ -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 };