Minor post fixes. Makes posts publishable with a date

This commit is contained in:
2025-06-26 14:57:34 -07:00
parent 6a97302539
commit b93123a8c9
4 changed files with 24 additions and 19 deletions

View File

@@ -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(),
}),

View File

@@ -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.

View File

@@ -5,7 +5,9 @@ import { getCollection } from 'astro:content';
import FormattedDate from '../../components/FormattedDate.astro';
import { Image } from 'astro:assets';
const posts = (await getCollection('blog')).sort(
const posts = (await getCollection('blog'))
.filter(p => p.data.pubDate)
.sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
);
---

View File

@@ -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%;