Use Markdown directly in Astro files
No need to manually add <p>
tags or convert apostrophes into quotes. Markdown
does this for you automatically.
<Markdown>Don't worry, be happy!</Markdown>
Don’t worry, be happy!
Don’t worry, be happy!
Include paragraphs too
Markdown
supports the standard Markdown syntax you expect.
If you write Markdown
content with a new line between paragaphs, you will get <p>
tags along with the bells and whistles you added.
<Markdown> ## This is my heading
And this is a paragraph with some **bold** text and *italics*.</Markdown>
<h2 id="this-is-my-heading">This is my heading</h2><p> And this is a paragraph with some <strong>bold</strong> text and <em>italics</em>.</p>
This is my heading
And this is a paragraph with some bold text and italics.
No indentation woes
Your content won’t be converted into <pre>
tags even if you indent 4 spaces or more. Just make sure they start with the same indentation!
<Markdown> ## This is my heading
And this is a paragraph with some **bold** text and *italics*.</Markdown>
<h2 id="this-is-my-heading">This is my heading</h2><p> And this is a paragraph with some <strong>bold</strong> text and <em>italics</em>.</p>
This is my heading
And this is a paragraph with some bold text and italics.