Blog

How to share state between islands in Astro?
To share state between islands in Astro, put the state in a small store that lives outside any component, in its own module, and import that modu
Dive Deeper
How to generate a sitemap in Astro?
To generate a sitemap in Astro, install the official @astrojs/sitemap integration with npx astro add sitemap and set the site option in `as
Dive Deeper
What are slots in Astro and how to use named slots?
Slots in Astro are placeholders that let a component accept markup from whoever uses it. You put a <slot /> element in the component's template
Dive Deeper
How to add search to a static Astro site?
To add search to a static Astro site, the simplest reliable option is Pagefind: build your site as usual, run npx pagefind --site dist to i
Dive Deeper
What is the difference between static and on-demand rendering in Astro?
The difference between static and on-demand rendering in Astro is when the HTML is created. With static rendering (also called prerendering),
Dive Deeper
How to use Svelte components in Astro?
To use Svelte components in Astro, run npx astro add svelte to install the official @astrojs/svelte integration, then import a .svelte file i
Dive Deeper