diff --git a/site/package.json b/site/package.json index bd93b88..18d48f4 100644 --- a/site/package.json +++ b/site/package.json @@ -13,7 +13,8 @@ "preview": "astro preview", "astro": "astro", "check": "astro check", - "deploy": "tsx ./scripts/deploy.ts" + "deploy": "tsx ./scripts/deploy.ts", + "sync": "astro sync" }, "dependencies": { "@astrojs/markdoc": "^0.4.4", diff --git a/site/src/content/blog/test.mdoc b/site/src/content/blog/test.mdoc index f2d575a..463775e 100644 --- a/site/src/content/blog/test.mdoc +++ b/site/src/content/blog/test.mdoc @@ -1,5 +1,6 @@ --- title: Test +description: "Test post" --- I'm a test post diff --git a/site/src/content/blog/typography-test.mdoc b/site/src/content/blog/typography-test.mdoc index bb40508..715ce6e 100644 --- a/site/src/content/blog/typography-test.mdoc +++ b/site/src/content/blog/typography-test.mdoc @@ -1,5 +1,6 @@ --- title: I'm a Heading 1 +description: Typography test --- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/site/src/content/config.ts b/site/src/content/config.ts index 501ae97..52b3c8c 100644 --- a/site/src/content/config.ts +++ b/site/src/content/config.ts @@ -3,7 +3,7 @@ import { z } from 'astro/zod'; const blogCollection = defineCollection({ type: 'content', - schema: z.object({ title: z.string() }), + schema: z.object({ title: z.string(), description: z.string() }), }); export const collections = { blog: blogCollection, diff --git a/site/src/layouts/Base.astro b/site/src/layouts/Base.astro index d1612ff..748f39e 100644 --- a/site/src/layouts/Base.astro +++ b/site/src/layouts/Base.astro @@ -5,15 +5,20 @@ import { base, header, nav } from './Base.css'; interface Props { title: string; + description: string; + type: 'website' | 'article'; } -const { title } = Astro.props; +const { title, description, type } = Astro.props; --- + + + {title} diff --git a/site/src/layouts/BlogPost.astro b/site/src/layouts/BlogPost.astro index 9dd42b6..4133079 100644 --- a/site/src/layouts/BlogPost.astro +++ b/site/src/layouts/BlogPost.astro @@ -3,13 +3,14 @@ import Base from './Base.astro'; interface Props { title: string; + description: string; slug: string; } -const { title, slug } = Astro.props; +const { title, description, slug } = Astro.props; --- - +

{title}

diff --git a/site/src/pages/index.astro b/site/src/pages/index.astro index fd3940d..ee15671 100644 --- a/site/src/pages/index.astro +++ b/site/src/pages/index.astro @@ -9,7 +9,11 @@ const blogEntries = (await getCollection('blog')).map((entry) => ({ })); --- - +

Blog

{ blogEntries.map((entry) => ( diff --git a/site/src/pages/posts/[slug].astro b/site/src/pages/posts/[slug].astro index bd47e8c..3c28025 100644 --- a/site/src/pages/posts/[slug].astro +++ b/site/src/pages/posts/[slug].astro @@ -14,6 +14,10 @@ const { entry } = Astro.props; const { Content } = await entry.render(); --- - +