Using universal page templates to build sites faster: Join us next Tuesday

ContactSign Up for Free
Community Plugin
View plugin on GitHub


If your markdown files have frontmatter path param then with this plugin you obtain converted links in your Gatsby pages.

So in GitHub you keep normal links between md files. And in Gatsby you will have path links.


For example, given the following project directory structure:

├── notes/


title: 'My article'
path: '/my_article'

Some text with [link](./notes/


title: 'My article'
path: '/copyright'

Read main [article](../

With this plugin all relative links will be transformed to:

// in ./
- Some text with [link](./notes/
+ Some text with [link](/copyright)

// in ./notes/
- Read main [article](../
+ Read main [article](/my_article)


npm install --save gatsby-remark-use-frontmatter-path

How to use

// In your gatsby-config.js
plugins: [
    resolve: 'gatsby-transformer-remark',
    options: {
      plugins: ['gatsby-remark-use-frontmatter-path'],
© 2023 Gatsby, Inc.