secum3r243 downloadsInserts a clickable table of contents at the top of the note, with a configurable maximum heading depth.
An Obsidian plugin that inserts a clickable table of contents at the top of the current note, built from its headings.
_index.md in a folder listing all notes and subfolders as clickable links._Main-Index.md at the vault root listing all folders.``` or ~~~) are ignored.Ctrl/Cmd + P) and run Table of Content: Insert at top of note.<!-- toc --> and <!-- /toc --> markers. Click any entry to jump to that heading.Configure the heading depth and sort order under Settings → Table of Content.
_index.md)Generates a _index.md file inside a folder listing all notes and subfolders as [[WikiLinks]].
Important — Obsidian behaviour: Opening the Command Palette shifts focus away from the file explorer, so any folder you had highlighted will be deselected. The plugin cannot detect which folder you clicked in the sidebar once the palette is open.
Workaround: Open any note inside the folder you want to index first, then run the command. The plugin uses the parent folder of the currently open note as the target.
Steps:
Ctrl/Cmd + P) and run Table of Content: Insert folder index._index.md is created (or updated) inside that folder with a nested list of all notes and subfolders.Configure the subfolder scan depth under Settings → Table of Content → Folder index.
_Main-Index.md)Generates a _Main-Index.md at the vault root listing all top-level folders as clickable links to their _index.md.
Ctrl/Cmd + P) and run Table of Content: Insert vault index._Main-Index.md is created (or updated) at the root of your vault._index.md. If _index.md does not exist yet for a folder, clicking the link will prompt Obsidian to create it.Configure the folder depth (max 2) under Settings → Table of Content → Vault index.
Go to Settings → Table of Content to configure:
| Setting | Description |
|---|---|
| Maximum heading depth | Heading levels included in the note TOC (1–6) |
| Sort order | Document order or alphabetical (a–z) |
| Maximum subfolder depth | How deep to scan subfolders for the folder index |
| Maximum folder depth | How many folder levels to show in the vault index (1–2) |
Copy main.js, manifest.json, and styles.css (if present) into:
<YourVault>/.obsidian/plugins/table-of-content/
Then reload Obsidian and enable Table of Content under Settings → Community plugins.
npm install
npm run build
This produces main.js at the project root, alongside manifest.json.
npm install
npm run dev # watch mode, recompiles on save
npm run lint # run ESLint
This project is licensed under the MIT License.