Skip to content

Latest commit

 

History

History

gatsby-remark-double-parenthesis-link

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

gatsby-remark-double-parenthesis-link

Transform ((block Id)) into [Link to block](idToURL('block Id')).

An example site for using this plugin is at https://mathieudutour.github.io/gatsby-digital-garden/

Installation

npm install gatsby-remark-double-parenthesis-link

Usage

Add the plugin to your Gatsby config:

{
  resolve: `gatsby-plugin-mdx`,
  options: {
    gatsbyRemarkPlugins: [
      {
        resolve: `gatsby-remark-double-parenthesis-link`,
      },
    ],
  },
}

By default, the plugin will resolve the url with:

(id: string) => `/${slugify(id)}`;

You can override this behavior by passing a idToURL option.