Skip to content

v7.1.0

Latest

Choose a tag to compare

@satnaing satnaing released this 06 Nov 02:18
· 3 commits to main since this release

Highlights

Table of contents beside your posts. Posts with 2 or more h2/h3 headings now get a table of contents next to the post from 1280px, and behind a floating button on smaller screens (#718, #542).
It's on by default. Turn it off with features.toc: false in your config, or per post with hideToc: true.

astro-paper-v7-1-0.mp4

The image lightbox also got better: wheel zoom and drag-to-pan on desktop, smoother zoom and pinch-to-zoom on mobile (#666 by @hazuki-keatsu).

No breaking changes in this one. But a few things work differently, so read the heads-ups below if you've customized the theme.

Deprecated, removed in v8

  • The ## Table of contents heading in posts. The build warns about posts that still have it, so you can remove it. The warning may miss a few (a heading with underlines or emphasis, and headings in src/content/pages/).
  • The remark-toc and remark-collapse packages. The theme doesn't use them anymore. If your astro.config.ts still imports them, posts with that heading show both tables of contents. Copy markdown.processor from the theme's astro.config.ts to fix it.
  • Leaving out the new post.tableOfContents and a11y.skipTableOfContents labels in a locale file. They fall back to English until v8.
  • scheduledPostMargin. It's ignored now. Remove it before v8.

Heads-ups

  • Scheduled posts publish by day in site.timezone (#707). A post timed later in the day now shows up from the start of that day. An unknown timezone falls back to UTC with a warning instead of failing the build. An empty post timezone counts as unset (#708). A scheduled post's OG image isn't built before its publish day anymore (#709).
  • Archives are grouped by site.timezone (#719 by @charles-hood). A post near a month boundary can move to another month. Without site.timezone, archives group by UTC, not your build machine's zone.
  • Custom OG templates. If you add @astrojs/react, your template's root object needs key: null (#711). And satori 0.63 (#721) changes layout defaults. A customized template must set position and boxSizing itself, add display: flex on any div that lays out its children as flex items, and give every border a style. Flex items now shrink by default, and a long p in a centred column may need width: "100%". See satori's 1bd1eb8, 42ee75b and a4d0d45.

Fixes

  • Wide tables scroll inside posts on small screens (#712, #574)
  • Build works on Windows (#681 by @QXiaoLingShang)
  • Build passes with non-JS files like _headers in public/ (#684 by @LazyEngineer99)
  • pnpm 9 can install the theme (#710)
  • </script> in a post title no longer breaks the post's structured data (#715 by @charles-hood)
  • Spacing around the RSS icon, archive counts and Back to top label (#714 by @charles-hood)
  • Spacing below code block filename labels (#678 by @bermudev)
  • No trailing slash on the RSS autodiscovery link (#676 by @LazyEngineer99)
  • The hidden /archives page is out of the sitemap (#719)

Docs

  • Guides updated for v7 and Astro 7 (#713, #716 by @charles-hood)
  • AI contribution guidelines, and scope and settled design decisions in CONTRIBUTING

What's Changed

  • fix: publish scheduled posts by day in the site timezone by @satnaing in #707
  • fix: treat an empty post timezone as unset and skip drafts' timezone check by @satnaing in #708
  • fix: skip scheduled posts when generating dynamic OG images by @satnaing in #709
  • feat: improve image light box by @hazuki-keatsu in #666
  • fix: RSS autodiscovery link still has the #647 trailing-slash bug by @LazyEngineer99 in #676
  • fix: add spacing below code block filename labels by @bermudev in #678
  • fix: let pnpm 9 install the theme (packages in pnpm-workspace.yaml) by @satnaing in #710
  • Fix typo in warning comment for dev mode by @kendaleiv in #683
  • [fix] make build script work on Windows (replace cp with a Node script) by @QXiaoLingShang in #681
  • fix: resolveDefaultOgImagePath's glob breaks on non-JS files in public/ by @LazyEngineer99 in #684
  • docs: update outdated how-to guides for v6 and Astro 7 by @satnaing in #713
  • fix(og-images): build no longer fails after adding @astrojs/react by @satnaing in #711
  • fix: let wide tables scroll inside posts on small screens (#574) by @satnaing in #712
  • fix: restore inline spacing stripped by Astro 7's compressHTML 'jsx' by @charles-hood in #714
  • fix: keep a </script> in a post title from ending the JSON-LD block by @charles-hood in #715
  • docs: fix five recipes that no longer match the v7 code by @charles-hood in #716
  • fix: group archives by the site timezone and drop /archives from the sitemap when hidden by @charles-hood in #719
  • feat: add a table of contents beside posts and a floating TOC button by @satnaing in #718
  • build(deps-dev): bump eslint-plugin-astro from 2.1.1 to 3.2.1 by @dependabot[bot] in #703
  • build(deps): bump satori to 0.63 and prettier to 3.9.10 by @satnaing in #721
  • build(deps): bump the minor-and-patch group across 1 directory with 6 updates by @dependabot[bot] in #722

New Contributors

Full Changelog: v7.0.0...v7.1.0