Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout
Build and Deploy
Lesson Plan
  1. Workshop Recordings
    1. Welcome to Build and Deploy!
    2. Important notes before you begin
    3. 📹 Session 1
    4. 📹 Session 2
    5. 📹 Session 3
    6. 📹 Session 4
    7. 📹 Session 5
    8. 📹 Session 6
    9. 📹 Session 7
    10. 📹 Session 8
    11. Next steps

Important notes before you begin

1m:19s

We’ve recorded the workshop when Astro is in 1.0.0-Beta.

Now Astro is already in v3 so some of the stuff you’re going to see here will be outdated.

Note

Even though some stuff is outdated, this workshop will still work and will give a great foundation on building with Astro, using a CMS with Sanity, and deploying with Netlify.

Here are the things that have changed:

Markdown Components have been deprecated and removed in favour of MDX

You can still use Markdown Components by installing the component through npm, then using it like this:

---
import Markdown from '@astrojs/markdown-component'
---
<Markdown>
# Markdown syntax is now supported!
**Yay!**
</Markdown>

A bit about MDX

You can think of MDX as MD + JSX — so you can write some JavaScript code within a markdown file.

This gives you the ability to do lots of things which, unfortunately, I will not be able to explain in full detail in this short intro.

Building with MDX in Astro is an amazing experience, but it requires you to change the way you’re thinking about Markdown.

The general idea is you’ll use an mdx file instead of an astro file so you’re writing MDX throughout.

If you’re interested in how I would do this, feel free to request this as a topic in our community — Dojo. 🙂

Astro.canonicalURL has been deprecated

To get the Canonical URL, you can use this code instead:

const URLObject = new URL(Astro.url.pathname, Astro.site)
const canonicalURL = URLObject.href

That’s it!