Skip to content

Commit

Permalink
Merge pull request #364 from jermspeaks/bug/timestamp-1
Browse files Browse the repository at this point in the history
Change og:image and updated timestamps
  • Loading branch information
jermspeaks authored Mar 6, 2024
2 parents 59d4012 + 7a53aa0 commit d71e373
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface Props {
title: string;
description: string;
image?: string;
imageAlt?: string;
twitterHandle?: string;
author?: string;
publishedDate?: string;
Expand All @@ -19,6 +20,7 @@ const {
author = "Jeremy Wong",
description,
image = "/meta-social.png",
imageAlt = "Craft By Zen Hero Image",
title,
twitterHandle = "@jermspeaks",
publishedDate = defaultDate,
Expand Down Expand Up @@ -49,7 +51,7 @@ const umamiTrackingCode = import.meta.env.PUBLIC_UMAMI_TRACKING_CODE;
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image, Astro.url)} />
<meta property="og:image:alt" content="Craft By Zen Hero Image" />
<meta property="og:image:alt" content={imageAlt} />

<!-- Articles -->
<meta
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-01-newsletter-announcement.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "We are officially migrating off the old platform and onto a new one."
draft: false
pubDate: "2024-02-01"
pubDate: "2024-02-01T08:00:00.000Z"
tags: ["announcement", "newsletter", "season_4"]
title: "Newsletter Announcement: Introducing Buttondown"
heroImage: https://images.unsplash.com/photo-1512236258305-32fb110fdb01?q=80&w=2374&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-05-w05-weekly-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Obsidian gems of 2023, another terrible thing happened in Florida, restoring children deafness, giant parasol could alleviate Global Warming, and Tailwind criticism."
draft: false
pubDate: "2024-02-05"
pubDate: "2024-02-05T08:00:00.000Z"
tags: ["weekly"]
title: 2024 Week 05 - Weekly Notes
heroImage: https://images.unsplash.com/photo-1506485338023-6ce5f36692df?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2370&q=80
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-07-weekly-review-annotated.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "My weekly review breakdown with annotations. Deep dive into the pillars of productivity."
draft: false
pubDate: "2024-02-07"
pubDate: "2024-02-07T08:00:00.000Z"
tags: ["weekly", "reflection", "breakdown"]
title: Weekly Review, Annotated (2024 Edition)
heroImage: https://images.unsplash.com/photo-1582801396492-705377f39876?q=80&w=2274&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-08-svelte.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: While I wrote my first Svelte application 4 years ago, I wanted to test my Svelte knowledge by solidifying it into a blog post.
draft: false
pubDate: "2024-02-08"
pubDate: "2024-02-08T08:00:00.000Z"
tags: ["learning", "programming", "Javascript", "Svelte"]
title: Svelte
coverImage: ../../images/svelte-machine-desktop.png
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-12-TIL-bulk-rename.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Using the rename utility"
draft: false
pubDate: "2024-02-12"
pubDate: "2024-02-12T08:00:00.000Z"
tags: ["TIL", "programming"]
title: TIL Bulk Rename MacOS CLI
coverImage: '../../images/TIL.png'
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-13-w06-weekly-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learning Models, Getting Fired live on TikTok, last week's storm, the boring stack, and recontrer."
draft: false
pubDate: "2024-02-13"
pubDate: "2024-02-13T08:00:00.000Z"
tags: ["weekly"]
title: 2024 Week 06 - Weekly Notes
heroImage: https://images.unsplash.com/photo-1506485338023-6ce5f36692df?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2370&q=80
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Creating a regular expression for decimal points"
draft: false
pubDate: "2024-02-15"
pubDate: "2024-02-15T08:00:00.000Z"
tags: ["TIL", "programming"]
title: TIL Regex for Decimal Points
coverImage: '../../images/TIL.png'
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-19-w07-weekly-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Mini website updates and reflecting on digital creativity and curation. Better thinking tools, the role of luck, productivity loss on Apple Vision Pro, jQuery v4.0, SORA, and the 7 C's of consulting."
draft: false
pubDate: "2024-02-19"
pubDate: "2024-02-19T08:00:00.000Z"
tags: ["weekly", "updates", "website"]
title: 2024 Week 07 - Weekly Notes
heroImage: https://images.unsplash.com/photo-1506485338023-6ce5f36692df?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2370&q=80
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-20-TIL-rename-git-branch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Instructions on changing remote and local git branches from master to main"
draft: false
pubDate: "2024-02-20"
pubDate: "2024-02-20T08:00:00.000Z"
tags: ["TIL", "git", "programming"]
title: TIL how to rename my master branch to main
coverImage: '../../images/TIL.png'
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-20-classifieds.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Classifieds have been added to the website. 📰🗞️"
draft: false
heroImage: "https://images.unsplash.com/photo-1504711331083-9c895941bf81?q=80&w=2370&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
heroImageAlt: "Classified newspaper page, photographed by AbsolutVision"
pubDate: "2024-02-20"
pubDate: "2024-02-20T08:00:00.000Z"
tags: ["website", "updates", "classifieds"]
title: "Introducing Classifieds"
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/writing/2024-02-27-w08-weekly-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Time on the Doomsday Clock, Personal website spaces, and AT&T outage."
draft: false
pubDate: "2024-02-27"
pubDate: "2024-02-27T08:00:00.000Z"
tags: ["weekly"]
title: 2024 Week 08 - Weekly Notes
heroImage: https://images.unsplash.com/photo-1506485338023-6ce5f36692df?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2370&q=80
Expand Down
8 changes: 7 additions & 1 deletion src/layouts/BlogPost.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ const {
updatedDate,
tags,
} = Astro.props;
// TODO: We should use coverImage for og:image using https://docs.astro.build/en/recipes/dynamically-importing-images/
---

<html lang="en">
<head>
<BaseHead title={title} description={description} />
<BaseHead
title={title}
description={description}
image={heroImage}
imageAlt={heroImageAlt}
/>
</head>

<BaseBody>
Expand Down

0 comments on commit d71e373

Please sign in to comment.