Feat: Add NewsArticle JSON-LD, large image previews and automatic modified dates

Articles get NewsArticle structured data (headline, image, dates, author,
publisher) plus article:published_time and article:modified_time, and the
homepage gets WebSite and Organization data. Every indexable page allows
max-image-preview:large. The modified date is the article folder's last
commit, so editing an article updates it, the sitemap lastmod included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 22:28:11 +00:00
co-authored by Claude Opus 5.5
parent fcce38b79a
commit f7bc273af8
4 changed files with 67 additions and 7 deletions
+2
View File
@@ -3,6 +3,8 @@ export const fmtDate = (date) =>
export const toISODate = (d) => new Date(d).toISOString().split("T")[0];
export const toISO = (d) => new Date(d).toISOString();
export const escapeHtml = (s = "") =>
String(s ?? "").replace(/[&<>"']/g, (ch) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }[ch]));