gatsby-remark-prettier
v1.0.0
Published
Run prettier on code blocks
Downloads
19
Maintainers
Readme
gatsby-remark-prettier
Format code blocks in markdown files using Prettier.
Install
npm install --save gatsby-transformer-remark gatsby-remark-prettier prettier
How to use
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-prettier`,
options: {
// Look for local .prettierrc file.
// The same as `prettier.resolveConfig(process.cwd())`
usePrettierrc: true,
// Overwrite prettier options, check out https://prettier.io/docs/en/options.html
prettierOptions: {}
},
},
// any highlight plugin should be after
`gatsby-remark-prismjs`,
],
},
},
]