whatisgithub

What is markdown-it-toc-and-anchor?

ruanyf/markdown-it-toc-and-anchor — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2016-09-29

3JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A markdown-it plugin that automatically builds a clickable table of contents and adds jump-to-section anchor links next to every heading.

Mindmap

mindmap
  root((markdown-it-toc-and-anchor))
    What it does
      Auto table of contents
      Adds anchor links
      Updates on edits
    Tech stack
      JavaScript
      markdown-it
    Use cases
      Blog post navigation
      Documentation sites
      Course content
    Audience
      Documentation writers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically generate a table of contents for a long blog post or doc page.

USE CASE 2

Add clickable anchor links next to headings so readers can jump to and share sections.

USE CASE 3

Keep navigation links in sync automatically when headings are reordered or added.

What is it built with?

JavaScriptmarkdown-it

How does it compare?

ruanyf/markdown-it-toc-and-anchoramarjitjim/browserpilotandershaig/cssess
Stars333
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-09-292011-08-19
MaintenanceDormantDormant
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires an existing markdown-it parser setup to plug into.

Copy-paste prompts

Prompt 1
Show me how to set up markdown-it-toc-and-anchor in a Node.js markdown-it project.
Prompt 2
Configure this plugin to skip h1 headings and only include h2 and below in the table of contents.
Prompt 3
Write markdown that uses the @[toc] tag with this plugin to insert a table of contents.

Frequently asked questions

What is markdown-it-toc-and-anchor?

A markdown-it plugin that automatically builds a clickable table of contents and adds jump-to-section anchor links next to every heading.

What language is markdown-it-toc-and-anchor written in?

Mainly JavaScript. The stack also includes JavaScript, markdown-it.

Is markdown-it-toc-and-anchor actively maintained?

Dormant — no commits in 2+ years (last push 2016-09-29).

How hard is markdown-it-toc-and-anchor to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is markdown-it-toc-and-anchor for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.