diff --git a/src/components/Post.astro b/src/components/Post.astro index 3f99268..6e926d3 100644 --- a/src/components/Post.astro +++ b/src/components/Post.astro @@ -14,7 +14,9 @@ const { Content } = await post.render();

{post.data.title}

{post.data.author}

-

{post.data.publishedTime}

+

+ {post.data.publishedTime.toLocaleDateString()} +

diff --git a/src/components/Posts.tsx b/src/components/Posts.tsx index 0ee6002..4194dfa 100644 --- a/src/components/Posts.tsx +++ b/src/components/Posts.tsx @@ -1,29 +1,29 @@ import type { CollectionEntry } from "astro:content"; type Props = { - posts: CollectionEntry<"blog">[]; + posts: CollectionEntry<"blog">[]; }; export default function Posts({ posts }: Props) { - return ( -
- {posts.map((post: CollectionEntry<"blog">) => { - return ( - - {post.data.title} - - {post.data.author} - - - {post.data.publishedTime.toLocaleString()} - - - ); - })} -
- ); + return ( +
+ {posts.map((post: CollectionEntry<"blog">) => { + return ( + + {post.data.title} + + {post.data.author} + + + {post.data.publishedTime.toLocaleDateString()} + + + ); + })} +
+ ); } diff --git a/src/content/blog/building-the-same-app-5-times.md b/src/content/blog/building-the-same-app-5-times.md index c6eb256..1fae989 100644 --- a/src/content/blog/building-the-same-app-5-times.md +++ b/src/content/blog/building-the-same-app-5-times.md @@ -1,6 +1,6 @@ --- title: Building the Same App 5 Times -publishedTime: 2021-08-18T00:02:25.286Z +publishedTime: 2021-08-18 --- ### Originally Published on Dev.To diff --git a/src/content/blog/i-followed-a-40-year-old-pascal-book-in-rust.md b/src/content/blog/i-followed-a-40-year-old-pascal-book-in-rust.md index 68c2851..9280ee7 100644 --- a/src/content/blog/i-followed-a-40-year-old-pascal-book-in-rust.md +++ b/src/content/blog/i-followed-a-40-year-old-pascal-book-in-rust.md @@ -1,6 +1,6 @@ --- title: I Followed a 40 year old Pascal Book (in Rust) -publishedTime: 2024-01-05T19:09:05.026Z +publishedTime: 2024-01-05 --- My father is a big fan of mystery novels, certainly more than I am. I enjoy a Sherlock Holmes story now and again, and I have had fun reading Agatha Christie novels, but he is and always will be a bigger fan of the genre than I. That being said, there is one mystery book I find much more interesting to me than he ever has, and that is "Elementary Pascal" by Henry Ledgard and Andrew Singer. My father will happily tell you the furthest he got in computer programming was making a 3D Cube in Basic and reading the programs for his Commodore 64 in a magazine, but almost never running them as he would have had to copy them each by hand. I, on the other hand, have much more of an interest in programming, as might be evident from the fact I am writing this blog post where I do so. When I was first learning to program as a kid, my father gave me this book that he'd had since he was a kid. He claimed to have hardly read it, but that I might be interested in it, and compared to him I certainly was. That said, I only ever read a few of the examples, as I had very little actual interest in learning Pascal. In more recent years, the book has sat on my shelf, undisturbed, waiting to once again be opened. Today was that day. diff --git a/src/content/blog/writing-my-own-lsp-in-go.md b/src/content/blog/writing-my-own-lsp-in-go.md index 5380b98..83cc503 100644 --- a/src/content/blog/writing-my-own-lsp-in-go.md +++ b/src/content/blog/writing-my-own-lsp-in-go.md @@ -1,6 +1,6 @@ --- title: Writing My Own Language Server in Go (to Parse Chess PGNs) -publishedTime: 2024-06-26T19:16:00.006Z +publishedTime: 2024-06-26 --- ### What is a Language Server? diff --git a/src/content/config.ts b/src/content/config.ts index 6b918b0..6839d7d 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -2,12 +2,12 @@ import { SITE } from "../config"; import { defineCollection, z } from "astro:content"; const blog = defineCollection({ - type: "content", - schema: z.object({ - author: z.string().default(SITE.author), - title: z.string(), - publishedTime: z.date() - }) + type: "content", + schema: z.object({ + author: z.string().default(SITE.author), + title: z.string(), + publishedTime: z.date() + }) }); export const collections = { blog };