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:
1 parent
2907b1e148
commit
7f8980b958
6 files changed
+24
-10
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user