Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View aduh95's full-sized avatar

Antoine du Hamel aduh95

View GitHub Profile
@aduh95
aduh95 / generate_toc.js
Last active September 28, 2017 08:34
Generate a table of contents, based on headings in the page, for Markdown and HTML document using JS and CSS counters
/**
* Based on the [Stuart Langridge script](https://kryogenix.org/code/browser/generated-toc/generated_toc.js)
* Generated TOC
* aduh95, 2017-09-28
*
* Generate a table of contents, based on headings in the page.
*
* To place the TOC on your Markdown or HTML document, insert this
* script and add the following `nav` element to your document where
* you want the TOC to be generated.
test