Type something to search...

Blog

How to add interactivity in Astro without a framework?

How to add interactivity in Astro without a framework?

To add interactivity in Astro without a framework, put a <script> tag inside your .astro component and use standard browser APIs: find elemen

Dive Deeper
How does Astro's island architecture work?

How does Astro's island architecture work?

Astro's island architecture works by rendering the whole page to static HTML on the server, then making only selected components interactive in t

Dive Deeper
How to add JSON-LD structured data in Astro?

How to add JSON-LD structured data in Astro?

To add JSON-LD structured data in Astro, build a JavaScript object that follows the schema.org vocabulary in your page's frontmatter, then output

Dive Deeper
How to loop over arrays in Astro components?

How to loop over arrays in Astro components?

To loop over an array in an Astro component, call .map() on the array inside curly braces in the template and return markup for each item, for

Dive Deeper
How to write blog posts in MDX with Astro?

How to write blog posts in MDX with Astro?

To write blog posts in MDX with Astro, install the official integration with npx astro add mdx, make sure your blog collection's glob() loade

Dive Deeper
What is Astro middleware and how to use it?

What is Astro middleware and how to use it?

Astro middleware is a function that runs before a page or endpoint is rendered, letting you inspect the request, share data with the route, or re

Dive Deeper