Blog

How does scoped CSS work in Astro components?
Scoped CSS in Astro means that any <style> tag you write inside an .astro component only applies to the HTML in that same component. At build
Dive Deeper
How to add SEO meta tags in Astro?
To add SEO meta tags in Astro, create a small Seo.astro component that accepts a title, description and image as props and renders the `
Dive Deeper
What is server islands in Astro and when to use it?
A server island in Astro is an Astro component marked with the server:defer directive, which tells Astro to render it on the server *separa
Dive Deeper
How to enable server-side rendering in Astro?
To enable server-side rendering in Astro, install an adapter for the runtime you deploy to, for example with npx astro add node, `npx astro add
Dive Deeper
How to use sessions in Astro?
To use sessions in Astro, make sure your project has an adapter and a session driver, then read and write data with Astro.session in on-dem
Dive Deeper
How to render raw HTML safely with set:html in Astro?
To render raw HTML in Astro, add the set:html directive to an element or a Fragment and pass it the HTML string: <div set:html={html} /> or
Dive Deeper