From 7f8980b958177ebe8a7498bfe0ea72d623a909fa Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 10 Jul 2026 19:21:26 -0500 Subject: [PATCH] fix: post date off-by-one and inconsistent placeholder links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Post/blog-index dates formatted pubDate in the local timezone, so a UTC-midnight date like 2026-07-10 rendered as July 9 anywhere west of UTC. Format with timeZone: 'UTC' to match the stored date. Also normalizes the npm package to @green-tea/core everywhere (Header and Footer still pointed at @expressive-tea/core) and settles on a single GitHub placeholder (https://github.com/green-tea-dev/green-tea) across Header, Footer, Hero, and HonestBeta — documented in the README as unconfirmed until launch. Docs CTAs in Hero and HonestBeta now open in a new tab with rel="noopener noreferrer", matching Header/Footer. Signed-off-by: Diego Resendez --- src/components/Footer.astro | 4 ++-- src/components/Header.astro | 4 ++-- src/components/sections/Hero.astro | 6 ++++-- src/components/sections/HonestBeta.astro | 6 ++++-- src/layouts/Post.astro | 7 ++++++- src/pages/blog/index.astro | 7 ++++++- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index d334b69..13e42aa 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -10,8 +10,8 @@ const linkColumns = [ { heading: 'Code', links: [ - { label: 'GitHub', href: 'https://github.com/expressive-tea/green-tea', external: true }, - { label: 'npm', href: 'https://www.npmjs.com/package/@expressive-tea/core', external: true }, + { label: 'GitHub', href: 'https://github.com/green-tea-dev/green-tea', external: true }, + { label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true }, ], }, ]; diff --git a/src/components/Header.astro b/src/components/Header.astro index 535f051..0fd8551 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -4,8 +4,8 @@ import logoUrl from '../assets/logo.svg?url'; const navLinks = [ { label: 'Docs', href: 'https://docs.green-tea.dev', external: true }, { label: 'Blog', href: '/blog', external: false }, - { label: 'GitHub', href: 'https://github.com/expressive-tea/green-tea', external: true }, - { label: 'npm', href: 'https://www.npmjs.com/package/@expressive-tea/core', external: true }, + { label: 'GitHub', href: 'https://github.com/green-tea-dev/green-tea', external: true }, + { label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true }, ]; --- diff --git a/src/components/sections/Hero.astro b/src/components/sections/Hero.astro index 64a0bc5..0511c2d 100644 --- a/src/components/sections/Hero.astro +++ b/src/components/sections/Hero.astro @@ -19,8 +19,10 @@ import GraphMotif from '../GraphMotif.astro';

- Get started - + + Get started + + GitHub diff --git a/src/components/sections/HonestBeta.astro b/src/components/sections/HonestBeta.astro index e66ec11..d8e54d4 100644 --- a/src/components/sections/HonestBeta.astro +++ b/src/components/sections/HonestBeta.astro @@ -11,8 +11,10 @@

diff --git a/src/layouts/Post.astro b/src/layouts/Post.astro index 4109075..4b10a67 100644 --- a/src/layouts/Post.astro +++ b/src/layouts/Post.astro @@ -14,7 +14,12 @@ interface Props { const { title, description, pubDate, updatedDate, author, tags, heroImage, body } = Astro.props; -const dateFormat = new Intl.DateTimeFormat('en-US', { month: 'long', day: 'numeric', year: 'numeric' }); +const dateFormat = new Intl.DateTimeFormat('en-US', { + month: 'long', + day: 'numeric', + year: 'numeric', + timeZone: 'UTC', +}); const wordCount = body.trim().split(/\s+/).filter(Boolean).length; const readingTime = Math.max(1, Math.round(wordCount / 200)); diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index ba9d0ca..10e5846 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -9,7 +9,12 @@ const posts = (await getCollection('blog', ({ data }) => !data.draft)).sort( (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() ); -const dateFormat = new Intl.DateTimeFormat('en-US', { month: 'long', day: 'numeric', year: 'numeric' }); +const dateFormat = new Intl.DateTimeFormat('en-US', { + month: 'long', + day: 'numeric', + year: 'numeric', + timeZone: 'UTC', +}); ---