diff --git a/www/src/content/bookmarks.yaml b/www/content/bookmarks.yaml similarity index 100% rename from www/src/content/bookmarks.yaml rename to www/content/bookmarks.yaml diff --git a/www/src/content/md/hello-world.md b/www/content/hello-world.md similarity index 100% rename from www/src/content/md/hello-world.md rename to www/content/hello-world.md diff --git a/www/src/content.config.ts b/www/src/content.config.ts index 811de53..0f7bc9d 100644 --- a/www/src/content.config.ts +++ b/www/src/content.config.ts @@ -4,7 +4,7 @@ import { z } from 'astro/zod'; import yaml from 'js-yaml'; const md = defineCollection({ - loader: glob({ pattern: '**/*.md', base: './src/content/md' }), + loader: glob({ pattern: '**/*.md', base: './content' }), schema: z.object({ title: z.string(), date: z.coerce.date().optional(), @@ -15,7 +15,7 @@ const md = defineCollection({ }); const bookmarks = defineCollection({ - loader: file('./src/content/bookmarks.yaml', { + loader: file('./content/bookmarks.yaml', { parser: (text) => { const data = yaml.load(text) as Array>; return data.map((item, i) => ({ id: String(i), ...item }));