refactor: moves content out to www root
This commit is contained in:
parent
1e1c8f000a
commit
20e72afa44
3 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ import { z } from 'astro/zod';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
|
|
||||||
const md = defineCollection({
|
const md = defineCollection({
|
||||||
loader: glob({ pattern: '**/*.md', base: './src/content/md' }),
|
loader: glob({ pattern: '**/*.md', base: './content' }),
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
date: z.coerce.date().optional(),
|
date: z.coerce.date().optional(),
|
||||||
|
|
@ -15,7 +15,7 @@ const md = defineCollection({
|
||||||
});
|
});
|
||||||
|
|
||||||
const bookmarks = defineCollection({
|
const bookmarks = defineCollection({
|
||||||
loader: file('./src/content/bookmarks.yaml', {
|
loader: file('./content/bookmarks.yaml', {
|
||||||
parser: (text) => {
|
parser: (text) => {
|
||||||
const data = yaml.load(text) as Array<Record<string, unknown>>;
|
const data = yaml.load(text) as Array<Record<string, unknown>>;
|
||||||
return data.map((item, i) => ({ id: String(i), ...item }));
|
return data.map((item, i) => ({ id: String(i), ...item }));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue