Read the ##/###/#### headings from your Markdown and build a table of contents.
- [Introduction](#introduction)
- [Background](#background)
- [Goals](#goals)
- [Usage](#usage)
- [Installation](#installation)
- [Requirements](#requirements)
- [Examples](#examples)
- [Conclusion](#conclusion)H1 (#) is skipped because it is usually the page title; H2, H3 and H4 are included. Anchor slugs follow the GitHub convention (lowercase, spaces to hyphens), and headings inside fenced code blocks are ignored.
H2 (##), H3 (###) and H4 (####) headings are extracted. H1 (#) is omitted because it is typically the page title and is not normally listed in a table of contents.
Yes. Lines inside fenced code blocks (``` or ~~~) are skipped even if they look like headings, so example markdown in your code samples won't pollute the TOC.
Anchors follow the GitHub convention: the heading text is lowercased, whitespace becomes hyphens, and punctuation is stripped. Unicode characters such as Japanese, Korean, or Chinese are preserved as-is.