-
I'm diving deeper into customising my marp setup and now I'm trying to add new markdown syntax to my slide deck. For instance let's say I want to add Is what I'm trying to do possible? If yes are there good examples/guides/starting point for I should be roughly doing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Of course. Marp has been maximized compatibility with markdown-it plugin ecosystem, so a way to extend Markdown syntax is exactly same as markdown-it. In the most cases, any Marp knowledgements are not required to make a plugin for extending syntax. Useful resources: The following snippets are how to test your plugin in Marp CLI (with customized engine): // engine.js
// https://github.com/marp-team/marp-cli#functional-engine
const yourMarkdownItPlugin = (md) => {
// Write markdown-it plugin for extending Markdown syntax as you like
}
module.exports = ({ marp }) => marp.use(yourMarkdownItPlugin) marp --engine ./engine.js your-markdown.md If met a situation to require manipulating something of Marp-specifics, e.g. slides, the first thing to do is reading Marpit API references. You can see details about public interface of Marpit instance and a bunch of internal markdown-it plugins. (Yes, actually Marp is consisted of a lot of markdown-it plugins!) In addition, reading source code of Marpit and Marp Core would be helpful to know how we are making some advanced features.
|
Beta Was this translation helpful? Give feedback.
Of course. Marp has been maximized compatibility with markdown-it plugin ecosystem, so a way to extend Markdown syntax is exactly same as markdown-it. In the most cases, any Marp knowledgements are not required to make a plugin for extending syntax.
Useful resources:
The following snippets are how to test your plugin in Marp CLI (with customized engine):