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

@hashicorp/remark-plugins

Package Overview
Dependencies
Maintainers
13
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/remark-plugins

A potpourri of remark plugins used to process .mdx files

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
13
Weekly downloads
 
Created
Source

HashiCorp Remark Plugins

A potpourri of remark plugins used by HashiCorp to process markdown files.

Overview

MDX uses remark internally to process and transform markdown via plugins. We use MDX to process markdown content to build out our docs, learning guides, and write rich content from our CMS. This set of plugins ensures that written markdown is translated properly into markup.

Linkable Headings

The headingLinkable plugin adds anchor links to our headings so that users are able to easily link to a specific heading even if it is further down the page. See its readme for more details.

Linkable Inline Code

The inlineCodeLinkable plugin adds anchor links when a list begins with an inline code element. In many places in our docs, there are lists of methods that are structured this way, and this plugin makes it easier for users to link to a specific method. See its readme for more details.

Custom Alerts

The paragraphCustomAlerts plugin adds a custom syntax for creating alert boxes. See its readme for more details. This plugin will be deprecated for a <Alert /> component in the future in a step to move us toward full commonmark compliance.

Typography

The typography plugin adds css classes to certain typographical elements so that they adhere to the typography standards from our design system. See its readme for more details.

Usage

Each of the plugins are individually exposed from the default export from this module and can be used as any other remark plugin would be normally. For example, with raw mdx:

const mdx = require('@mdx-js/mdx')
const {typography, headingLinkable} = require('@hashicorp/remark-plugins')

console.log(mdx.sync('some markdown content', {
  remarkPlugins: [typography, headingLinkable]
})

If you'd like to use all of the plugins in one shot, which is typically the case with this module, an array of all the plugins is returned from the allPlugins export, as such:

const mdx = require('@mdx-js/mdx')
const {allPlugins} = require('@hashicorp/remark-plugins')

console.log(mdx.sync('some markdown content', {
  remarkPlugins: allPlugins
})

If you are using next-hashicorp, all of these plugins will be included by default.

FAQs

Package last updated on 24 Jun 2019

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