Ensure table of contents in your markdown documents are up to date by combining the remark-toc and remark-slug plugins and generating it dynamically.
git clone https://github.com/johno/egghead-lessons
cd egghead-lessons/remark-toc
yarn
yarn start
open index.html