Skip to content

Commit ff2a881

Browse files
committed
etc: rename pubDate to date
1 parent 8544854 commit ff2a881

20 files changed

Lines changed: 27 additions & 27 deletions

src/components/blog/PostHeader.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
interface Props {
33
title: string;
4-
pubDate: Date;
4+
date: Date;
55
lastModDate?: Date;
66
tags?: string[];
77
categories?: string[];
@@ -12,8 +12,8 @@ import { Icon } from "astro-icon/components";
1212
1313
const {
1414
title,
15-
pubDate,
16-
lastModDate = pubDate,
15+
date,
16+
lastModDate = date,
1717
tags = [],
1818
categories = [],
1919
} = Astro.props;
@@ -27,10 +27,10 @@ const postTags = hashtagPostTags(tags);
2727
>Posted:</span
2828
>
2929
<time class="inline">
30-
{formatPostDate(pubDate)}
30+
{formatPostDate(date)}
3131
</time>
3232
{
33-
lastModDate.getTime() > pubDate.getTime() ? (
33+
lastModDate.getTime() > date.getTime() ? (
3434
<div class="inline ml-8">
3535
<span class="font-bold">Last Updated:</span>
3636
<time class="inline">{formatPostDate(lastModDate)}</time>

src/components/blog/PostInfo.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const content = marked(body);
2020
>Posted:
2121
</span>
2222
<time
23-
datetime={post.data.pubDate.toISOString()}
23+
datetime={post.data.date.toISOString()}
2424
class="font-semibold text-sm text-branding-gray-700 dark:text-gray-400"
25-
>{formatPostDate(post.data.pubDate)}</time
25+
>{formatPostDate(post.data.date)}</time
2626
>
2727
{
2828
post.body && (
@@ -53,7 +53,7 @@ const content = marked(body);
5353
set:html={content}
5454
/>
5555
<a
56-
href={`/blog/${slugifyPostDate(post.data.pubDate)}/${post.id}`}
56+
href={`/blog/${slugifyPostDate(post.data.date)}/${post.id}`}
5757
class="block rounded-sm text-sm bg-branding-navy-600 w-fit text-white h-fit px-2 py-1 mt-1 dark:hover:bg-branding-navy-500 duration-100 transition-colors hover:bg-branding-navy-700"
5858
>Read More</a
5959
>

src/content.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ const blog = defineCollection({
1111
draft: z
1212
.boolean({ required_error: "Every post is either a draft or not." })
1313
.default(true),
14-
pubDate: z.date({
14+
date: z.date({
1515
required_error: "You need to have a date when the post was published.",
1616
}),
1717
tags: z.array(z.string()).optional(),
1818
categories: z.array(z.string()).optional(),
19-
lastModDate: z.date().optional(),
19+
lastMod: z.date().optional(),
2020
featured: z
2121
.boolean({ invalid_type_error: "A post is either featured or not." })
2222
.default(false),

src/content/blog/avoiding-tailwinds-cdn-limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Avoiding Tailwind's CDN Limitations"
3-
pubDate: 2021-10-25T00:00:00-04:00
3+
date: 2021-10-25T00:00:00-04:00
44
slug: "avoiding-tailwinds-cdn-limitations"
55
description: "Tailwind's CDN is limited compared to a normal installation. Here's how I work around those limitations."
66
tags:

src/content/blog/building-a-site-with-org-publish.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Getting Started with Ox-publish"
3-
pubDate: 2021-10-27T00:00:00-04:00
3+
date: 2021-10-27T00:00:00-04:00
44
lastModDate: 2022-04-07T17:11:55-04:00
55
slug: "building-sites-org-publish"
66
draft: true

src/content/blog/building-a-website-from-our-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Building A Website From Our Notes"
3-
pubDate: 2021-09-20T17:21:00-04:00
3+
date: 2021-09-20T17:21:00-04:00
44
slug: "building-a-website-from-our-notes"
55
tags:
66
- "Org-roam"

src/content/blog/building-hydras-for-org-roam.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Building Hydras for Org-roam"
33
author: ["Jacob Hilker"]
4-
pubDate: 2021-06-14T22:43:00-04:00
4+
date: 2021-06-14T22:43:00-04:00
55
lastmod: 2022-04-07T17:11:52-04:00
66
slug: "building-hydras-for-org-roam"
77
tags: ["Org-roam", "Worldbuilding", "Wikis", "Emacs", "Org-mode"]

src/content/blog/building-infoboxes-with-tailwindcss.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Building Infoboxes with TailwindCSS"
33
author: ["Jacob Hilker"]
4-
pubDate: 2021-11-21T12:31:00-05:00
4+
date: 2021-11-21T12:31:00-05:00
55
slug: "building-infoboxes-with-tailwindcss"
66
tags:
77
- "TailwindCSS"

src/content/blog/featuring-site-content-in-hugo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Featuring Site Content in Hugo
33
draft: false
4-
pubDate: 2021-02-03
4+
date: 2021-02-03
55
slug: featuring-content-in-hugo
66
description: 'How I implemented "pinned" content in Hugo for my site.'
77
tags: []

src/content/blog/gear-doesnt-matter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Gear Doesn't Matter"
3-
pubDate: 2021-10-24T00:00:00-04:00
3+
date: 2021-10-24T00:00:00-04:00
44
tags: ["Audio Engineering", "Sound Design"]
55
categories: ["Audio Engineering", "Sound Design"]
66
draft: true

0 commit comments

Comments
 (0)