feat(design): deploy default OG card (JPG/PNG), complete banner hygiene (E8), modernize CJK typography (E9), align title & hero (A2)
Deploy / build (push) Successful in 21s

This commit is contained in:
hoelee committed 2026-10-18 02:27:45 +08:00
1 parent c1aa62ecca
commit 3f63150d51
17 files changed
+564 -42

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@ const updatedLabel = isZh ? '更新于' : 'Updated';
const catHref = (cat: string) => `/${isZh ? 'zh/categories' : 'categories'}/${cat}/`;
const og = (post: CollectionEntry<'posts'>) => post.data.ogImage || '/og-default.png';
const og = (post: CollectionEntry<'posts'>) => post.data.ogImage || '/og-default.jpg';
// Tag pills only link when the tag has its own page (>= TAG_MIN_POSTS in this language).
const counts = tagCounts((await getCollection('posts', ({ data }) => !data.draft))
@@ -36,7 +36,7 @@ const counts = tagCounts((await getCollection('posts', ({ data }) => !data.draft
// the same art instead (5.8 KB / 16.1 KB — see scripts/optimize-images.py).
const hasThumb = (post: CollectionEntry<'posts'>) => {
const p = og(post);
return p.startsWith('/og/') && p !== '/og-default.png';
return p.startsWith('/og/') && p !== '/og-default.png' && p !== '/og-default.jpg';
};
const thumb = (post: CollectionEntry<'posts'>, w: 400 | 800) =>
og(post).replace('/og/', '/og/thumb/').replace(/\.png$/, `-${w}.webp`);