Gatsby theme that let you create pages from .mdx
files inside the pages
directory
- Install the theme
npm i --save @horacioh/gatsby-theme-mdx
# or
yarn add @horacioh/gatsby-theme-mdx
- Add the theme to yout
gatsby-config.js
files
# gatsby-config.js
module.exports = {
// ...
plugins: [
// ...
{
resolve: `@horacioh/gatsby-theme-mdx`,
options: {
syntaxHighlight: true // (default: true) add/remove syntax highlight with `gatsby-remark-prismjs`
}
}
]
}
- Create
.mdx
files on yoursrc/pages
folder and you are all set.
// pages/index.mdx
# Hello MDX page
gatsby-plugin-mdx
: to transform.mdx
files to pages. docsgatsby-remark-prismjs
: to style codeblocks properly. docsgatsby-plugin-theme-ui
: base & extensable styles for theme components. docs
Any questions or feedback is welcome!. please if you don't understand something or need more documentation os some utility please file an issue or send me a tweet.
Happy Theming!!