fix: post date off-by-one and inconsistent placeholder links
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 <diego.resendez@zero-oneit.com>
This commit is contained in:
6 files changed
+24
-10
No files matched your search
@@ -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 },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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 },
|
||||
];
|
||||
---
|
||||
|
||||
|
||||
@@ -19,8 +19,10 @@ import GraphMotif from '../GraphMotif.astro';
|
||||
</p>
|
||||
|
||||
<div class="btn-row hero__ctas">
|
||||
<a class="btn btn--primary" href="https://docs.green-tea.dev">Get started</a>
|
||||
<a class="btn btn--ghost" href="https://github.com/expressive-tea/green-tea" target="_blank" rel="noopener noreferrer">
|
||||
<a class="btn btn--primary" href="https://docs.green-tea.dev" target="_blank" rel="noopener noreferrer">
|
||||
Get started
|
||||
</a>
|
||||
<a class="btn btn--ghost" href="https://github.com/green-tea-dev/green-tea" target="_blank" rel="noopener noreferrer">
|
||||
GitHub
|
||||
</a>
|
||||
<a class="btn btn--ghost" href="https://www.npmjs.com/package/@green-tea/core" target="_blank" rel="noopener noreferrer">
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
</p>
|
||||
|
||||
<div class="btn-row honest__ctas">
|
||||
<a class="btn btn--primary" href="https://docs.green-tea.dev">Read the docs</a>
|
||||
<a class="btn btn--ghost" href="https://github.com/expressive-tea/green-tea" target="_blank" rel="noopener noreferrer">
|
||||
<a class="btn btn--primary" href="https://docs.green-tea.dev" target="_blank" rel="noopener noreferrer">
|
||||
Read the docs
|
||||
</a>
|
||||
<a class="btn btn--ghost" href="https://github.com/green-tea-dev/green-tea" target="_blank" rel="noopener noreferrer">
|
||||
Star on GitHub
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
---
|
||||
|
||||
<Base title={title} description={description}>
|
||||
|
||||
Reference in new issue
Block a user