I was tired of building 474 separate pages for Open Graph Images

Zach Leatherman · 2026年9月9日

AI 摘要 AI 生成,可能有误

作者用一个单一的 /opengraph/ 页面(该页面在客户端渲染元数据)替换了他博客上 474 个各自由服务器端渲染的静态 Open Graph 图片页面,这一权衡是可以接受的,因为最终输出仍是由基于 Chromium 的截图服务生成的静态图片,且缓存机制保持不变。这种方法使得在他的多个网站上实现 Open Graph 支持变得更容易构建和管理,这些网站包括 zachleat.com、build.awesome.me 和 speedlify.dev。重要的是,图片内容严格以本地页面 URL 作为键,不允许任何自由格式的 URL 参数对其产生影响。

Prior blog post (if you want the full context): If I work really hard on my Open Graph Images, People will share my Blog Posts (2021 Aug)

Here’s the gist:

Open Graph images are those little pictures that show up when your site is shared on social media. […] Each individual blog post (on my website) has a dedicated Open Graph image page.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Zach Leatherman

Your Tools are Hiding npm Audits from You

AI 摘要This article argues that npm audit results can be misleading because tools like Next.js bundle 139 of their own dependencies outside of standard auditing mechanisms, hiding 3 critical vulnerabilities—more hidden critical vulnerabilities than visible ones in the no-longer-maintained Gatsby. Similar practices of bundling dependencies or suppressing audit output exist in Vite, various create- CLI tools, and package managers like pnpm and yarn, undermining transparency in security auditing. The author built the Prototype Pollution Report, a daily-updating comparison of vulnerability counts across framework ecosystems, to normalize these discrepancies and provide clearer security insight.

All of my 300+ browser tabs are beautiful

AI 摘要The article introduces a Firefox addon the author built to manage their habit of hoarding 300+ browser tabs. The addon provides features such as sorting tabs by recency, detecting duplicates, searching/filtering by title or URL, full undo/redo support, and a 'Saved' section for storing tabs to restore later. It also supports multi-account containers, identifies tabs playing audio, shows stale tabs, offers light and dark modes, and can merge all tabs into a single window.

“AI, make the website good”

AI 摘要The author reflects skeptically on the current AI-driven wave of development tooling—agents that plan, write, review, and orchestrate code—questioning whether these developer-experience improvements actually translate into better software for real users, just as similar promises around client-side rendering and the single-page-application era failed to do. Citing anecdotal declines in software reliability and poor performance/accessibility scores among AI-related sites, the author suspects this cycle repeats the old playbook at an accelerated pace. They conclude that craft, defined as caring about the quality of output regardless of the tools used to produce it, is more important than ever.

Icon Fall Web Component

AI 摘要The author introduces , a web component that makes icons (including emoji) fall across a website, created as a follow-up to . Originally built as an easter egg for Blog Awesome, it is now publicly available on GitHub and installable via npm. It offers configuration options for the icon count and a customizable, comma-separated list of colors.

Table of Contents Web Component

AI 摘要The article introduces a zero-CSS table of contents web component that can either progressively enhance server-rendered or hierarchies or client-render them, highlighting which headings are currently visible in the viewport. Extracted from the WebC Tugboat starter project for standalone use, it is available on npm as @zachleat/table-of-contents, with demos shown on the author's blog and Blog Awesome. Developers can configure a selector attribute to control the heading search scope, defaulting to main :is(h2, h3, h4, h5, h6).