Basic Usage

Markdown gives you the ability to write markdown in an .astro file.

---
import { Markdown } from '@splendidlabz/astro'
---
<Markdown>
## Markdown Heading 2
You can write **markdown** *content* inside this component.
</Markdown>

Inline Markdown Content

If you want Markdown to create content without a <p> wrapper, write your content in Markdown without a new line.

<Markdown>Hello world</Markdown>

Usage with Prettier

If you use Prettier, you’ll need to ignore the Markdown block because Prettier tends to mangle markdown content — causing them to be incorrect.

<!-- prettier-ignore -->
<Markdown>
Paragraph 1
Paragraph 2
</Markdown>