From b93123a8c9d5f45c3d6ca636d319c5527d208a5e Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Thu, 26 Jun 2025 14:57:34 -0700 Subject: [PATCH] Minor post fixes. Makes posts publishable with a date --- src/content.config.ts | 3 ++- src/content/blog/i-forgot-to-use-ai.md | 6 ++++-- src/pages/blog/index.astro | 8 +++++--- src/styles/global.css | 26 +++++++++++++------------- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/content.config.ts b/src/content.config.ts index 28561fb..6c6f38e 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -10,7 +10,8 @@ const blog = defineCollection({ title: z.string(), description: z.string(), // Transform string to Date object - pubDate: z.coerce.date(), + // Presence of this value indicates that the post is published + pubDate: z.coerce.date().optional(), updatedDate: z.coerce.date().optional(), heroImage: image().optional(), }), diff --git a/src/content/blog/i-forgot-to-use-ai.md b/src/content/blog/i-forgot-to-use-ai.md index 0d4035f..c4f64a9 100644 --- a/src/content/blog/i-forgot-to-use-ai.md +++ b/src/content/blog/i-forgot-to-use-ai.md @@ -1,14 +1,16 @@ --- title: "I Forgot to Use AI On My Latest Project" description: "I forgot to use an LLM to assist on my latest coding project. I probably set the progress of humanity back many hours. But hey, I learned something along the way. What did I learn? That I'd rather not use an LLM on this project." -pubDate: "Jun 21 2025" +pubDate: "Jun 26 2025" --- I forgot to use AI on my last project. All the tech bros are laughing at me right now. I'm sure in the time I wasted I could have launched a cloud-based passive-income app, but now I have to have fun staying poor. I'll cry myself to sleep right after I get the satisfaction of learning something new and building something with my own mind. ## Building something new just like everything else -I finally decided that I should have a blog. Yes, here we are in 2025, approximately 20 years after the blog craze started and about 10 years after it ended. What better time to start a blog than in an era when content is more plentiful than other and simultaneously harder to find and discover? It's actually a perfect time because it's a perfect time for me. +I finally decided that I should have a blog. Yes, here we are in 2025, approximately 20 years after the blog craze started and about 10 years after it ended. What better time to start a blog than in an era when content is the most plentiful and simultaneously harder to find and discover? + +It's a perfect time because it's a perfect time for me. I've spent the last two decades mostly working in corporate tech. All my energy and productivity has been directed into those corporations. I've written so many detailed design docs, posted many impassioned Slack memos, carefully hand-crafted status reports. But guess what? No one really cared. A few years later they were lost in the depths of Google Drive or the Slack archives, waiting for some new employee to stumble upon them when desperately searching for an answer to how things got the way they were. Ultimately they weren't useful. Did they really reach anyone? I would like to think so, but they never had a life of their own. They were never durable, they never lasted. diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 4f6feee..b047a72 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -5,9 +5,11 @@ import { getCollection } from 'astro:content'; import FormattedDate from '../../components/FormattedDate.astro'; import { Image } from 'astro:assets'; -const posts = (await getCollection('blog')).sort( - (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), -); +const posts = (await getCollection('blog')) + .filter(p => p.data.pubDate) + .sort( + (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), + ); --- diff --git a/src/styles/global.css b/src/styles/global.css index 82bb35e..f85b9c2 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -44,8 +44,8 @@ @font-face { font-family: "Fira Code"; src: - url("woff2/FiraCode-Light.woff2") format("woff2"), - url("woff/FiraCode-Light.woff") format("woff"); + url("/fonts/FiraCode-Light.woff2") format("woff2"), + url("/fonts/FiraCode-Light.woff") format("woff"); font-weight: 300; font-style: normal; } @@ -53,8 +53,8 @@ @font-face { font-family: "Fira Code"; src: - url("woff2/FiraCode-Regular.woff2") format("woff2"), - url("woff/FiraCode-Regular.woff") format("woff"); + url("/fonts/FiraCode-Regular.woff2") format("woff2"), + url("/fonts/FiraCode-Regular.woff") format("woff"); font-weight: 400; font-style: normal; } @@ -62,8 +62,8 @@ @font-face { font-family: "Fira Code"; src: - url("woff2/FiraCode-Medium.woff2") format("woff2"), - url("woff/FiraCode-Medium.woff") format("woff"); + url("/fonts/FiraCode-Medium.woff2") format("woff2"), + url("/fonts/FiraCode-Medium.woff") format("woff"); font-weight: 500; font-style: normal; } @@ -71,8 +71,8 @@ @font-face { font-family: "Fira Code"; src: - url("woff2/FiraCode-SemiBold.woff2") format("woff2"), - url("woff/FiraCode-SemiBold.woff") format("woff"); + url("/fonts/FiraCode-SemiBold.woff2") format("woff2"), + url("/fonts/FiraCode-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; } @@ -80,8 +80,8 @@ @font-face { font-family: "Fira Code"; src: - url("woff2/FiraCode-Bold.woff2") format("woff2"), - url("woff/FiraCode-Bold.woff") format("woff"); + url("/fonts/FiraCode-Bold.woff2") format("woff2"), + url("/fonts/FiraCode-Bold.woff") format("woff"); font-weight: 700; font-style: normal; } @@ -89,8 +89,8 @@ @font-face { font-family: "Fira Code VF"; src: - url("woff2/FiraCode-VF.woff2") format("woff2-variations"), - url("woff/FiraCode-VF.woff") format("woff-variations"); + url("/fonts/FiraCode-VF.woff2") format("woff2-variations"), + url("/fonts/FiraCode-VF.woff") format("woff-variations"); /* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */ font-weight: 300 700; font-style: normal; @@ -151,7 +151,7 @@ p { margin-bottom: 1em; } .prose p { - margin-bottom: 2em; + margin-bottom: 1em; } textarea { width: 100%;