Astro is a modern web framework that lets you build fast, content-focused websites. Combined with Sanity's flexible content platform, you can create a blog with powerful content management and real-time editing capabilities.
In this guide, we'll dive deeper into what you'll need to know in order to make a blog with Astro and Sanity. You'll learn how to:
- Set up static and dynamic routes based on content from your Sanity project
- Implement block content with Portable Text, and add custom block types
- Work with images from the Sanity CDN
- Configure Sanity's Presentation Tool tool for live Visual Editing
This guide won't add styling to the markup, we'll leave that up to you. That said, it's often easier to develop the design when the basic markup and content are in place.
Prerequisites
This guide uses TypeScript for code examples, but you can adapt them to JavaScript if preferred. You don't need prior experience with Sanity or Astro, though familiarity with the
Before starting, make sure you have
- Node.js 22 or later. (link)
- A code editor.
- Basic familiarity with TypeScript (optional).
- This guide uses Astro v6 and Sanity v5.16. We recommend following along with these major versions.
```npm create astro@latest```