{"repo":"abhinav/goldmark-toc","free":true,"listed":false,"github":"https://github.com/abhinav/goldmark-toc","clone":"git clone https://github.com/abhinav/goldmark-toc.git","description":"Support for generating Tables of Contents from goldmark Markdown documents.","language":"Go","stars":25,"topics":["golang","markdown"],"license":"BSD-3-Clause","category":"productivity","readme_excerpt":"goldmark-toc goldmark-toc is an add-on for the [goldmark] Markdown parser that adds support for rendering a table-of-contents. [goldmark]: http://github.com/yuin/goldmark Demo : A web-based demonstration of the extension is available at . Installation Usage To use goldmark-toc, import the toc package. Following that, you have three options for using this package: - [Extension][]: This is the easiest way to get a table of contents into your document and provides very little control over the output. - [Transformer][]: This is the next easiest option and provides more control over the output. - [Manual][]: This option requires the most work but also provides the most control. [Extension]: #extension [Transformer]: #transformer [Manual]: #manual Extension To use this package as a simple Goldmark extension, install the Extender when constructing the goldmark.Markdown object. This will add a \"Table of Contents\" section to the top of every Markdown document parsed by this Markdown object. NOTE: The example above enables parser.WithAutoHeadingID . Without this or a custom implementation of parser.IDs , none of the headings in the document will have links generated for them. Changing the title If you want to use a title other than \"Table of Contents\", set the Title field of Extender . You can specify an ID for the title heading with the TitleID option. Adding an ID If you want the rendered HTML list to include an id, set the ListID field of Extender . This will render: Limiting the Ta","default_branch":null,"files":null,"tree":[],"storefront":"/r/abhinav","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/abhinav/goldmark-toc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}