diff --git a/src/content.config.ts b/src/content.config.ts index 9dffb76..512ba12 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -13,6 +13,7 @@ const blog = defineCollection({ title: z.string(), description: z.string(), subtitle: z.string().optional(), + author: z.string().optional(), section: z.string().optional(), date: z.coerce.date(), hidden: z.boolean().optional().default(false), diff --git a/src/content/blog/technical/writing-code-was-hard-actually.mdx b/src/content/blog/technical/writing-code-was-hard-actually.mdx index 2dcf984..907dfb7 100644 --- a/src/content/blog/technical/writing-code-was-hard-actually.mdx +++ b/src/content/blog/technical/writing-code-was-hard-actually.mdx @@ -5,8 +5,9 @@ description: >- The revisionist claim that writing code was never the hard part arrives conveniently at the moment AI makes it cheap to produce. But the market, the machine, and the engineers who built it all tell a different story. +author: InlinePizza date: '2026-02-24T00:00:00.000Z' -section: Technical +section: Opinion hidden: false --- diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index c1b901a..1abba14 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -27,6 +27,9 @@ const { Content, headings } = await render(entry); + {entry.data.author && ( +

By {entry.data.author}

+ )}

{entry.data.title}

+ {entry.data.author && ( +

By {entry.data.author}

+ )} {(entry.data.description || entry.data.subtitle) && (

{entry.data.description || entry.data.subtitle}

)} diff --git a/src/styles/custom.css b/src/styles/custom.css index a839321..5833c0e 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -642,6 +642,20 @@ main:has(.pl-site-page.pl-site-page-compact) .content-panel + .content-panel { text-decoration: underline; } +.collection-feed-author { + margin: 0; + color: var(--sl-color-gray-3); + font-size: var(--sl-text-xs); + font-weight: 500; +} + +.collection-post-author { + margin: 0 0 1.5rem; + color: var(--sl-color-gray-3); + font-size: var(--sl-text-sm); + font-weight: 500; +} + .collection-feed-description { margin: 0; max-width: 72ch;