Skip to content

11.4.0: Tables of contents

Compare
Choose a tag to compare
@bensmithett bensmithett released this 23 Aug 23:16
· 6 commits to main since this release
8083ab6

Changes

  • Extract a table of contents from MDX pages (based on heading slugs)
    • Add @stefanprobst/rehype-extract-toc Rehype plugin and configure in Vite config
    • Update entry-server.jsx to pass extracted tableOfContents data as props to Layout and Page components
    • Add a very basic <TableOfContents> component & stories

Diff: #52

Upgrade instructions (more info)

Merge upstream changes

First, configure this repo as a remote for your repo (you only need to do this once)

  git remote add template https://github.com/bensmithett/tropical.git

Then fetch & merge the latest changes, resolving any conflicts manually:

git fetch template
git merge template/main

or...

Manually update your code

Merging upstream changes should be straightforward for this change but see v11.3.0...v11.4.0 for changes you can make to your project manually.

As always, open an issue if you're having trouble upgrading and I'll help you through it!