Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@altano/remark-mdx-toc-with-slugs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@altano/remark-mdx-toc-with-slugs

A remark plugin to generate a table of contents (including slugs) and convert it into MDX export

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by133.33%
Maintainers
1
Weekly downloads
 
Created
Source

remark-mdx-toc-with-slugs

Summary

This is a remark plugin that exports a table of contents. It is similar to the @altano/remark-mdx-toc plugin but has an additional slug property.

Given this mdx:

## Resource Acquisition Is Initialization (RAII)

### Is There a Problem?

### C++ Classes

### The Solution

remark-mdx-toc-with-slugs exports this object on the toc field:

export const toc = [
  {
    depth: 2,
    value: "Resource Acquisition Is Initialization (RAII)",
    slug: "resource-acquisition-is-initialization-raii",
    attributes: {},
    children: [
      {
        depth: 3,
        value: "Is There a Problem?",
        attributes: {},
        children: [],
        slug: "is-there-a-problem",
      },
      {
        depth: 3,
        value: "C++ Classes",
        attributes: {},
        children: [],
        slug: "c-classes",
      },
      {
        depth: 3,
        value: "The Solution",
        attributes: {},
        children: [],
        slug: "the-solution",
      },
    ],
  },
];

Options

  • name: The exported variable name of the table of contents. By default, it's toc.

Misc

Keywords

FAQs

Package last updated on 28 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc