11.4.0: Tables of contents
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 extractedtableOfContents
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!