Skip to content

v2.3.0

Latest

Choose a tag to compare

@hutusi hutusi released this 02 Dec 13:22

Upgrading from 2.2.0

  • Share-card font grows to 6.9MB. The upgrade replaces src/fonts/og/NotoSerifSC-Bold.otf with the wider one unless you rebuilt it yourself. A binary can't be merged, so a font you rebuilt stays and the new one lands beside it as NotoSerifSC-Bold.otf.amytis-new. Use that one, or rerun scripts/build-og-fonts.py to rebuild yours with the wider set.

Added

  • Missing Share-Card Glyphs Are Named: when a share card uses a character the bundled fonts in src/fonts/og/ can't draw, the build prints an [og] warning naming it, the cards that use it, and how to fix it. next/og downloads such characters from Google Fonts during the build. On an offline or firewalled machine they used to show up only as a fonts.googleapis.com connect timeout and a box on the card. Emoji get a warning of their own: next/og downloads them from cdn.jsdelivr.net, and offline a failed download fails the build. scripts/build-og-fonts.py now bundles every character the cards draw, authors and site name included, not only titles.

Changed

  • The Link Check Covers Share Images: the post-build link check now checks og:image and twitter:image as it checks <img>. A share image on your own domain with no file in the export counts as a missing image, so it is reported, and fails the build under linkCheck: 'error'. Images on other hosts, a CDN included, are not checked. An image URL that leads to a page, such as a cover set to /posts/x/, now counts as missing too; it used to pass because the page exists.

Fixed

  • Link Check Honors <base href>: on a page with a <base href>, the link check resolved relative links and images against the page's own folder instead of the base, as a browser does. A working link could be reported broken (and fail the build under linkCheck: 'error'), and a broken one could pass. Amytis's own pages have no <base>; this affects pages you keep in public/.
  • Link Check Reads .htm Pages: the link check scanned only pages ending in lower-case .html, so links in an .htm or .HTML page kept in public/ went unchecked. They are checked now, and fail the build under linkCheck: 'error' like any other.
  • Link Check Pages Named Like index.html: the link check took any page whose name ended in index.html, such as subindex.html kept in public/, for a directory index. It reported the page as /sub, and its #section links as broken.
  • Cover Images in Social Previews on CDN Sites: with images.cdnBaseUrl set, pages render their covers from the CDN, but the share tags (og:image, twitter:image) and the JSON-LD image still pointed the cover at the site itself, where it usually isn't deployed. Those URLs returned 404, so X, Facebook, LinkedIn, Telegram and the rest showed link previews with no picture, and Google saw a broken article image. Covers on posts, book chapters, and series and book landing pages are now shared from the CDN. Generated share cards and ogImage stay on the site. After deploying, ask Facebook (Sharing Debugger) and LinkedIn (Post Inspector) to re-fetch your pages; X refreshes its cached previews on its own within about a week.
  • Real Image Sizes in Social Previews: every share image claimed to be 1200×630 in og:image:width and og:image:height, whatever its real size. Facebook and LinkedIn lay out the preview from that size, so a cover of another shape could be cropped or stretched. Covers and ogImage now declare the size read from their file in public/, and generated cards keep 1200×630. A photo stored sideways with an EXIF rotation tag gets its upright size, there and on the page. A ?v=2 cache-buster on ogImage, or on a cover served from your site, no longer hides the size. A cover that exists only on your CDN, or on another site, declares no size, which is safe; the build doesn't download images to measure them.
  • Rare Chinese Characters on Share Cards: the Chinese font bundled for generated share cards covered only GB2312's 6,763 common hanzi. Any other character, such as 昇 in 昇腾, was fetched from Google Fonts during the build. On an offline or firewalled machine that cost a 10-second timeout and drew a box on the card. The font now carries the whole CJK Unified Ideographs block (20,992 hanzi, common and rare, simplified and traditional), so those cards build offline. It grows from 2.1MB to 6.9MB.
  • No Gap Where the Language Switch Would Be: the language switch hides itself on a single-language site, or before any page has a translation, but its slot stayed. In the navbar it left Search and the theme toggle twice as far apart as the other icons, and the mobile menu ended with an empty bordered strip. The footer's bottom links could start with a stray "|". The slot and the separator now disappear with the switch.