Skip to content

Instantly share code, notes, and snippets.

@sarah11918
Created November 21, 2021 17:35
Show Gist options
  • Save sarah11918/15296cb3a51530e8d944e6abbdae50b2 to your computer and use it in GitHub Desktop.
Save sarah11918/15296cb3a51530e8d944e6abbdae50b2 to your computer and use it in GitHub Desktop.
Astro v0.21.0 - differences that aren't bugs/breaking changes

What's DIFFERENT (but not necessarily buggy/breaking) in Astro 0.21.0 ???

1. How to include a layout in .md files

Previously, front matter REQUIRED a layout property (e.g. layout: ../../layouts/MarkdownPostLayout.astro) Now, it's ALSO OK to include your layout as an import in "setup":

setup: |
  import Layout from '../../layouts/BlogPost.astro'
  import SomeOtherComponent from '../../components/SomeOtherComponent.astro'
@sarah11918
Copy link
Author

4. In .md files, descriptions in square brackets can no longer include double quotation marks. (Single are fine)

X Breaking: ![My first "real" app](/images/image.jpg)

✓ Working: ![My first 'real' app](/images/image.jpg)

@sarah11918
Copy link
Author

5. Importing to use the <Markdown> component in .astro files now requires curly braces, whereas older versions were lenient

X Breaking:

---
 import Markdown from 'astro/components';
---

✓ Working:

---
 import { Markdown } from 'astro/components';
---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment