Steps:
- install marked
npm install marked
- create a helper
import { marked } from 'marked';
export function markdown(options) {
return marked(options.fn(this));
}
- import helper and use it in handlebars block
<article>
<h1>My Blog</h1>
{{#markdown}}
## How To Support Markdown in Handlerbars
> Important: don't leave any extra space in front of the line, or it will break markdown and be treated as normal string
### Correct title
### Wrong: this line will not be parsed
We provide online minigames on https://freeapplegame.com . You are welcome to play for free. We have very few ads on our minigame center to provide gameplay-experience-marketing balance.
Free free to let us know your thoughts or any games you're looking for.
{{/markdown}}
</article>
Any questions, contact freeapplegame.com
Important: don't leave any extra space in front of the line, or it will break markdown and be treated as normal string