Repository navigation
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 contentsheading 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 insrc/content/pages/). - The
remark-tocandremark-collapsepackages. The theme doesn't use them anymore. If yourastro.config.tsstill imports them, posts with that heading show both tables of contents. Copymarkdown.processorfrom the theme'sastro.config.tsto fix it. - Leaving out the new
post.tableOfContentsanda11y.skipTableOfContentslabels 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 posttimezonecounts 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. Withoutsite.timezone, archives group by UTC, not your build machine's zone. - Custom OG templates. If you add
@astrojs/react, your template's root object needskey: null(#711). And satori 0.63 (#721) changes layout defaults. A customized template must setpositionandboxSizingitself, adddisplay: flexon anydivthat lays out its children as flex items, and give every border a style. Flex items now shrink by default, and a longpin a centred column may needwidth: "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
_headersinpublic/(#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
/archivespage 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
- @bermudev made their first contribution in #678
- @kendaleiv made their first contribution in #683
- @QXiaoLingShang made their first contribution in #681
- @charles-hood made their first contribution in #714
Full Changelog: v7.0.0...v7.1.0