npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

insta-toc

v6.3.0

Published

Simultaneously generate, update, and maintain a table of contents for your notes in real time.

Readme

Insta TOC Plugin

Version Downloads NPM Version

A plugin to dyamically generate and maintain a table of contents for you in real time.

Table of Contents

Demonstration

./assets/media/assets/media/demonstration.gif

Features: Insta TOC vs Other ToC Plugins

There are various other ToC plugins for Obsidian, however, they come with certain limitations which this plugin aims to mitigate and improve upon which includes:

Seamless Integration & Dynamic Generation

  • Just insert the code block and start typing. There's nothing more to it.
  • Other ToC plugins generate the ToC via command activation.
  • This plugin is designed for performance and simplicity for maximum convenience and organization.

Omit Specific Headings

  • Exclude any heading you want from the ToC by simply adding <!-- omit --> to the end of the heading.
  • Alternatively, utilize the local settings to omit specific headings.

HTML & Special Symbols

  • Feel free to include HTML or any kind of special symbols within headings. This plugin will handle these cases elegantly.
  • You can additionally specify which characters should be escaped within the local settings.

Heading Hierarchy Handling

  • Include any type of heading hierarchy you want. Your heading structure doesn't have to be any certain way.
  • Other plugins will prohibit the ToC insertion if the heading hierachy is not in a particular optimal format.

Markdown Links & Wiki-Links

  • This plugin will handle multiple of both markdown links ([Title]\(https://link)) and wiki-links ([[file-name.md]]) within headings.

Settings

Usage

General Usage

  • Insert the insta-toc code block:

    ```insta-toc
    ```

Omit Specific Headings

  • If you want to omit a specific heading from the ToC, simply add <!-- omit --> to the end of the heading.

    # Heading 1 <!-- omit -->
  • Alternatively, utilize the local settings:

    ---
    omit: [
      "Heading 1",
      "Heading 2"
    ]
    ---
    ---
    omit:
      - Heading 1
      - Heading 2
    ---

Local ToC Settings Guide

The local settings use YAML formatting, which is a format that is very particular about perfect spacing. I'll be implementing auto-correction logic soon to account for this, but for the time being ensure that you are only indenting with 2 spaces, otherwise you will get errors.

  • Type Guide:

    ---
    title:
      name: [string: any]
        - The title of the ToC.
      level: [number: 1 | 2 | 3 | 4 | 5 | 6]
        - The heading level of the title.
      center: [boolean: true | false]
        - Optionally center position of the title.
    exclude: [string: any | RegExp: /.../]
      - Exclude specific headings based on a string of characters (e.g., ",._-+=") or a regular expression (e.g., /[^a-zA-Z0-9]/).
      - NOTE: Currently, this will include global excluded characters as well.
    style:
      listType: [string: "number" | "dash"]
        - The type of list-bullet style.
    omit: [string[]: any[]]
      - Omit specific headings from the ToC.
    levels:
      min: [number: 1 | 2 | 3 | 4 | 5 | 6]
        - The minimum heading level to include in the ToC.
      max: [number: 1 | 2 | 3 | 4 | 5 | 6]
        - The maximum heading level to include in the ToC.
    ---
  • Example 1:

    ---
    title:
      name: "Table of Contents"
      level: 2
      center: false
    exclude: ",._-+"
    style:
      listType: "dash"
    omit: [
      "Heading 1",
      "Heading 2"
    ]
    levels:
      min: 1
      max: 3
    ---
  • Example 2:

    ---
    title:
      name: "Table of Contents"
      level: 1
      center: true
    exclude: /[^a-zA-Z0-9]/
    style:
      listType: number
    omit:
      - Heading 3
      - Heading 4
    levels:
      min: 2
      max: 6
    ---

Installation

Obsidian

  1. Open Obsidian and press CMD+,.
  2. Navigate to the Community plugins tab and click the Browse button.
  3. Navigate to the search bar and type Insta TOC
  4. Click the install button.

BRAT

  1. Install BRAT community plugin.
  2. Open Obsidian and press CMD+SHIFT+P.
  3. Type >BRAT: Plugins: Add a beta plugin for testing and select the option.
  4. Insert https://github.com/iLiftALot/insta-toc and submit.

npm

npm install insta-toc

Manual

  1. Download the latest release.
  2. Extract the insta-toc folder from the zip to your vault's plugins folder: /path/to/<vault>/.obsidian/plugins/. Note: On some machines the .obsidian folder may be hidden. On MacOS you should be able to press CMD+SHIFT+. to show the folder in Finder.
  3. Reload Obsidian.

Contributing


Road Map