Blog

How to add syntax highlighting to code blocks in Astro?
Syntax highlighting works in Astro out of the box. Every fenced code block in your Markdown and MDX files, such as one starting with three backti
Dive Deeper
How to add tags and category pages to an Astro blog?
To add tags and category pages to an Astro blog, store them in each post's frontmatter, declare them in your collection schema (for example `tags: z.
Dive Deeper
How to set up Tailwind CSS in Astro?
To set up Tailwind CSS in Astro, run npx astro add tailwind. The command installs tailwindcss and the official @tailwindcss/vite plugin, ad
Dive Deeper
How to test Astro components with Vitest?
To test Astro components with Vitest, create a vitest.config.ts that wraps your settings in Astro's getViteConfig() helper, then use the **Co
Dive Deeper
How to type component props with TypeScript in Astro?
To type component props in Astro, declare an interface or type named Props in the component script, then destructure Astro.props as usual: `i
Dive Deeper
How to add page transitions with the View Transitions API in Astro?
To add page transitions in Astro, import the <ClientRouter /> component from astro:transitions and place it in the <head> of a shared layou
Dive Deeper