Skip to content

Commit 1672068

Browse files
committed
Add summary for meta tags
1 parent 98c545f commit 1672068

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/content/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const posts = defineCollection({
1010
date: z.coerce.date(),
1111
headerImage: image().optional(),
1212
headerImageAlt: z.string().optional(),
13+
summary: z.string().optional(),
1314
preview: z.string().optional(),
1415
}),
1516
});

src/content/posts/2025-12-28--my-2025-in-books.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: My 2025 in Books
33
date: 2025-12-28
44
headerImage: ../../assets/images/2025-books.png
55
headerImageAlt: some of my top-rated books of 2025
6+
summary: Looking back at a year of reading audiobooks and my favorite reads of the bunch.
67
---
78

89
This year I set a goal of 50 [books read](/reading). I passed that goal at the beginning of October, I think, when I finished one of my favorites of the year, [_The Incandescent_ by Emily Tesh][incandescent]. With a few days left, [I'm at 66 books read this year](https://app.thestorygraph.com/reading_challenges/dashboard/bnsfly), every single one of them an audiobook.[^1] My "Read" pile grows slowly; my "To Be Read" pile grows much faster, and I try not to think about the fact that it is probably _already_ impossible for me to read everything in my TBR pile with the days left in my life. But here's a little retrospective on what I've read this year, including my [Top 5](/blog/2025/12/my-2025-in-books#top-5) for the year.

src/pages/blog/[...slug].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ const post = (await getCollection('posts', (p) => slug === getSlug(p)))[0];
2828
if (!post) throw new Error(`Post not found: ${slug}`);
2929
3030
const {
31-
data: { title, date, headerImage, headerImageAlt },
31+
data: { title, date, headerImage, headerImageAlt, summary },
3232
} = post;
3333
const img = headerImage ? { url: headerImage.src, alt: headerImageAlt! } : undefined;
3434
const published = dayjs.utc(date).startOf('day');
3535
3636
const { Content } = await post.render();
3737
---
3838

39-
<BaseLayout title={title} image={img?.url}>
39+
<BaseLayout title={title} image={img?.url} description={summary}>
4040
<Post title={title} posted={published} headerImage={img}>
4141
<Content />
4242
</Post>

0 commit comments

Comments
 (0)