Skip to content

Commit cebab69

Browse files
committed
Address Cole's review comments
Signed-off-by: macdonst <simon.macdonald@gmail.com>
1 parent 048e6e9 commit cebab69

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/docs/md/patterns/rendering-markdown.md

+14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Enhance can be used to render Markdown with minimal effort — in fact, this ver
1010

1111
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.
1212

13+
Add the Arcdown package to your project:
14+
15+
```bash
16+
npm install arcdown
17+
```
18+
1319
Here's a quick example of parsing a markdown string with Arcdown:
1420

1521
```javascript
@@ -203,6 +209,14 @@ export default function DocContent ({ html, state }) {
203209
204210
</doc-code>
205211
212+
Test it out by starting the development server:
213+
214+
```bash
215+
enhance dev
216+
```
217+
218+
Then open a browser tab to [localhost:3333/markdown/example](https://localhost:3333/markdown/example) and you’ll see the rendered markdown file.
219+
206220
That's all you need in order to get started using markdown in an Enhance app.
207221
208222
## Using custom elements in markdown

0 commit comments

Comments
 (0)