Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Table of Contents for GitLab

John SmithJohn Smith31 downloads

Create a table of contents with GitLab-compatible heading links.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates6

Create managed tables of contents whose Markdown links follow GitLab 17+ heading-anchor rules, including Unicode lowercasing, punctuation removal, and duplicate-heading suffixes.

This is a GitLab-focused fork of obsidian-plugin-toc by Andrew Lisowski.

Features

  • Create a full-document TOC at any cursor position.
  • Create a TOC for the next heading level at any cursor position.
  • Automatically update any number of managed TOCs after headings are added, renamed, removed, or reordered.
  • Exclude individual headings with an invisible HTML comment.
  • Toggle heading exclusion from the command palette or the editor right-click menu.
  • Generate GitLab-compatible anchors for Unicode, punctuation, and duplicate headings.
  • Follow those raw GitLab-compatible links natively inside Obsidian without changing the Markdown.

Usage

Open the command palette and run one of these commands:

  • Create managed table of contents scans the entire note, regardless of where the cursor is located.
  • Create managed table of contents for next heading level uses the closest heading above the TOC as its parent and lists that section's shallowest eligible child level. At the top of a note, it lists the shallowest eligible heading level in the document.
  • Toggle current heading exclusion from generated TOCs adds or removes the exclusion marker on the current heading.
  • Update managed tables of contents now immediately refreshes all generated TOCs in the note.

The editor right-click menu also offers both TOC creation actions. While the cursor is on a Markdown heading, it additionally offers Exclude heading from generated TOCs or Include heading in generated TOCs.

Managed TOCs

The plugin surrounds generated content with HTML comments:

<!-- toc-gitlab:start mode=full -->
- [Example](#example)
<!-- toc-gitlab:end -->

These comments do not render in Obsidian, GitLab, or ordinary Markdown viewers. Do not remove them if you want the TOC to update automatically. TOCs created by older versions are plain text and must be recreated once to become managed.

Multiple managed TOCs in one note are supported. Automatic updates are enabled by default and can be disabled in the plugin settings.

Excluding a heading

Add <!-- toc-ignore --> at the end of an ATX-style Markdown heading:

## Internal notes <!-- toc-ignore -->

The heading still renders normally and still receives its normal GitLab anchor, but it is omitted from every generated TOC. The marker can be added or removed through the command palette or editor right-click menu.

Settings

Setting Default Purpose
List style Bullet Generate bullet or numbered lists.
Title Empty Optional content placed before each generated list.
Minimum heading depth 2 Shallowest eligible heading level.
Maximum heading depth 6 Deepest eligible heading level.
Use Markdown links Off Generate Markdown links instead of WikiLinks.
GitLab-compatible Markdown section links Off Apply GitLab heading-anchor rules.
Automatically update managed TOCs On Refresh TOCs after heading edits.

For portable GitLab documents, enable Use Markdown links and GitLab-compatible Markdown section links. The plugin intercepts Obsidian's native link router at runtime, maps GitLab fragments to their real headings, and uses temporary in-memory block targets for exact navigation—including duplicate headings. The raw Markdown remains GitLab-compatible and no compatibility plugin is required.

Installation

Install from the Obsidian community plugin browser when available, or download the latest release and place main.js and manifest.json in:

<vault>/.obsidian/plugins/toc-gitlab/

Then reload Obsidian and enable Table of Contents for GitLab under Community plugins.

Development

npm ci
npm test
npm run build
npm run lint
HealthGood
ReviewSatisfactory
About
Create a table of contents with Markdown heading links that follow GitLab 17+ anchor rules, including Unicode lowercasing, punctuation removal, and duplicate-heading suffixes. Generate a full or next-level TOC from the command palette and output bullet or numbered lists compatible with GitLab section links.
MarkdownLinksNavigation
Details
Current version
0.4.4
Last updated
2 weeks ago
Created
2 weeks ago
Updates
6 releases
Downloads
31
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
John SmithJohn Smithvinggit
GitHubvinggit
  1. Community
  2. Plugins
  3. Markdown
  4. Table of Contents for GitLab

Related plugins

Breadcrumbs

Visualise the hierarchy of your vault using a breadcrumb trail or matrix view.

Auto Link Title

Automatically fetches the titles of links from the web.

Strange New Worlds

Reveal networked thought and the strange new worlds created by your vault.

Consistent Attachments and Links

Move note attachments and update links automatically.

Link Embed

Convert URLs in your notes into embeded previews.

Easy Copy

Easily copy the text within inline code, bold text (and many other formats), or quickly generate an elegant link to a heading or block.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.