Markdown transformer for Gridsome
yarn add @gridsome/transformer-remark
npm install @gridsome/transformer-remark
module.exports = {
transformers: {
remark: {
externalLinksTarget: '_blank',
externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
anchorClassName: 'icon icon-link',
plugins: [
// ...global plugins
]
}
},
plugins: [
{
use: '@gridsome/source-filesystem',
options: {
path: 'blog/**/*.md',
typeName: 'Post',
remark: {
plugins: [
// ...local plugins
]
}
}
}
]
}
- Type:
array
Default:[]
Add additional plugins to the parser.
- Type:
boolean
Default:true
Set this option to false
to disable all built-in plugins.
parse
Parse front matter datatoAST
Parse markdown into a syntax treeapplyPlugins
Transform a syntax tree by applying plugins to it (async)toHTML
Compile a syntax tree into HTML