Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MD-ContentsNew to Visual Studio Code? Get it now.
MD-Contents

MD-Contents

Peter White

|
14,745 installs
| (0) | Free
Utility to add/remove contents section to MarkDown document.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MD-Contents

Install

This package is not formally registered with npm. To install:

  1. Download the released tarball for this repository - md-contents-1.1.2.tar.gz.
  2. From the location of the downloaded tarball, execute the following from a command line:
$ npm install -g md-contents-1.2.0.tar.gz

Usage

Visual Code

In Visual Code, spin up a Command Palette (View|Command Palette... or [Ctrl]+[Shift]+P). You can use te following:

  • md-contents - Add (Exclude Navigation)
  • md-contents - Add (Include Navigation)
  • md-contents - Remove (Exclude Navigation)
  • md-contents - Remove (Include Navigation)

Command Line

To add a contents section to an existing MarkDown document, execute the following from a command line:

$ md-contents [filename] add

To remove a contents section from an existing MarkDown document, execute the following from a command line:

$ md-contents [filename] remove

To add a contents section to an existing MarkDown document and navigation aids to subsections, execute the following from a command line:

$ md-contents [filename] add -n

To remove a contents section and navigation aids from an existing MarkDown document, execute the following from a command line:

$ md-contents [filename] remove -n

:notebook: There is no ability to update the contents already added to a MarkDown document using this utility. As a workaround, remove the existing contents and add again using the procedures above.

Known Issues

If you get the following error when executing md-contents from a command line in a Windows environment, try adding the path to your main npm installation as an environment variable called NODE_PATH.

internal/modules/cjs/loader.js:979
  throw err;
  ^

Error: Cannot find module 'md-2-json'

:notebook: The path to you main npm installation is typically C:\Users\\[user name]\AppData\Roaming\npm\node_modules.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft