Before we dive into other aspects of content, I think the most important thing you need to understand is Markdown, because Markdown is extremely useful when writing web content.
It lets us:
- Write content without worrying about styling
- Output several HTML tags like
pliandcodein an easy way - Handle typography elements like apostrophes without HTML entities
If you are building a blog with Astro, you’ll definitely be touching Markdown. Even if you are not building a blog, Markdown makes HTML much easier to write.
<!-- Markdown input -->Example of **some** markdown _content_
- It's easy to write in markdown- It'll be transformed into HTML<!-- HTML output --><p>Example of <strong> some </strong> markdown <em>content</em></p><ul> <li>It’s easy to write in markdown</li> <li>It’ll be transformed into HTML</li></ul>Markdown documentation
We’re not going to dive into Markdown syntax in Practical Astro because you can find that all over the web. Markdown Guide is a great place to start.
We’re going to focus on making Markdown work for you here.
Using Markdown in Astro
Astro has built-in support for Markdown, so we don’t have to install anything to make it work.
There are three ways to use Markdown. We’ll cover these in detail in the next couple of lessons.
- Direct import
- Content collections
- Markdown layout
The next most important thing for you to know is MDX.
Welcome! Unfortunately, you don’t have access to this lesson. To get access, please purchase the course or enroll in Magical Dev School.
Unlock this lesson