Skip to content

Extract headings for table of contents out of HTML markup and add permalinks to the headings.

License

Notifications You must be signed in to change notification settings

aranggitoar/go-html-toc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go HTML TOC

DISCLAIMER: This script doesn't handle correctly headings that contains other tags. It is made to work only on plain headings that's created by a rich text or markdown editor.

Extracts relevant table of contents data out of your HTML markup and add permalinks to your markup's headings.

Takes your HTML markup, outputs a string in JSON format of the relevant data (level, content and slug) and inserts permalinks to the markup's headings.

Found bugs?

Please contact me at at@aranggitoar.com.

About

Extract headings for table of contents out of HTML markup and add permalinks to the headings.

Topics

Resources

License

Stars

Watchers

Forks