Socket
Socket
Sign inDemoInstall

remark-slug

Package Overview
Dependencies
17
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    remark-slug

Legacy remark plugin to add anchors to headings — please use `rehype-slug`


Version published
Weekly downloads
3.7M
decreased by-4.07%
Maintainers
2
Install size
328 kB
Created
Weekly downloads
 

Package description

What is remark-slug?

The remark-slug npm package is a plugin for the remark Markdown processor that automatically adds slugs to headings in a Markdown document. This is useful for generating links to specific sections of the document, enhancing navigation and accessibility.

What are remark-slug's main functionalities?

Automatic Slug Generation

This feature automatically generates slugs for each heading in a Markdown document. The code sample shows how to use remark-slug with remark and remark-html to convert a Markdown heading into HTML with a slug.

const remark = require('remark');
const remarkHtml = require('remark-html');
const remarkSlug = require('remark-slug');

remark()
  .use(remarkSlug)
  .use(remarkHtml)
  .process('# Hello world', function (err, file) {
    console.log(String(file));
  });

Other packages similar to remark-slug

Readme

Source

remark-slug

Stability: Legacy. This package is no longer recommended for use. It’s still covered by semantic-versioning guarantees and not yet deprecated, but use of this package should be avoided. Please use remark-rehype to move from remark (markdown) to rehype (HTML) and then replace remark-slug with rehype-slug.

Legacy documentation for this package is still available in Git.

License

MIT © Titus Wormer

FAQs

Last updated on 24 Oct 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc