@pga/gatsby-plugin-markdown-to-html

0.0.3 • Public • Published

gatsby-plugin-markdown-to-html

Gatsby plugin to convert markdown files into html pages

Install

npm install --save gatsby-plugin-markdown-to-html

Usage

In gatsby-config.js:

plugins: [
  'gatsby-plugin-markdown-to-html',
]

Example markdown page in ./src/pages/contact-us.md:

---
title: Contact Us
layout: some-layout
---

This plugin will create a page at /contact-us/ and use the ./src/layouts/some-layout.js component as the template.

A default layout can be specified in case the markdown file does not contain a layout value:

plugins: [
   {
      resolve: 'gatsby-plugin-markdown-to-html',
      options: {
         path: '../__pages', // Path to markdown files to be converted to pages
         templatePath: './src/layouts', // Path to page templates
         template: 'default', // Default template to use if none is supplied
      }
   }
]

Readme

Keywords

none

Package Sidebar

Install

npm i @pga/gatsby-plugin-markdown-to-html

Weekly Downloads

4

Version

0.0.3

License

ISC

Unpacked Size

7.83 kB

Total Files

10

Last publish

Collaborators

  • silvait
  • bsubedi26
  • jasonwalkow
  • georgeismike
  • kevinjscott
  • pgamachineuser