diff --git a/app/docs/md/patterns/rendering-markdown.md b/app/docs/md/patterns/rendering-markdown.md index 97e6d402..b9767ae4 100644 --- a/app/docs/md/patterns/rendering-markdown.md +++ b/app/docs/md/patterns/rendering-markdown.md @@ -10,6 +10,12 @@ Enhance can be used to render Markdown with minimal effort — in fact, this ver When rendering Markdown to HTML in Enhance projects, we rely on [Arcdown](https://github.com/architect/arcdown), which packages together our preferred conventions for parsing Markdown files. Under the hood, Arcdown makes use of [markdown-it](https://markdown-it.github.io/), an excellent JavaScript Markdown parser that is highly configurable via a wealth of plugins. +Add the Arcdown package to your project: + +```bash +npm install arcdown +``` + Here's a quick example of parsing a markdown string with Arcdown: ```javascript @@ -203,6 +209,14 @@ export default function DocContent ({ html, state }) { +Test it out by starting the development server: + +```bash +enhance dev +``` + +Then open a browser tab to [localhost:3333/markdown/example](https://localhost:3333/markdown/example) and you’ll see the rendered markdown file. + That's all you need in order to get started using markdown in an Enhance app. ## Using custom elements in markdown