Closes #1267 (closed) Closes #1271 (closed)
Summary
This PR enables the construction of table-of-contents markup during build time.
In DRYing out our markup, I had to remove {% include "nav/toc.njk" %} from numerous .njk files. The most notable markdown changes are in base.njk and toc.njk.
I also made a new JS file to allow the table-of-content disclosure state to be progressively enhanced.
Additional changes
details-element-polyfill.js is now in the src/js/lib folder. It's shorter, and more conventional.
To do
-
Ensure that pages that are exceptions to the automatic table of content structure render correctly.
@ericwbailey, I caught a couple pages for whom we do not want to auto-generate the TOC (like \ and \posts\); can you think of any others?