Overview:
Astro Sanity Minimal Starter is a blog website with a headless CMS setup using Sanity.io. Despite its minimalistic style, it offers excellent SEO capabilities, customization options, and great performance. This starter is designed to provide a solid foundation for a personal blog while allowing users the flexibility to style and structure the website to their preferences.
Features:
- Customizable headless CMS with Sanity.io
- Excellent SEO Built In
- Open Graph Tags (Twitter, Facebook, etc.)
- User Declared Canonical URLs
- RSS Feed
- XML Sitemap
- Robots.txt
- JSON LD Schema
- Extremely minimal styles
- Performant Google Fonts Setup
Installation:
Initial Sanity Setup:
- Create a repo from the template.
- If the Sanity CLI is not installed, run
npm install -g @sanity/cli. - Open a terminal from the root folder of the project.
- Change directory to the sanity folder:
cd sanity. - Run
sanity installand thensanity initto set up Sanity (create a Sanity account if needed).
Configuration Settings:
- Navigate to the astro folder.
- Rename
.env.templateto.env. - Replace the
PUBLIC_SANITY_PROJECT_IDvalue with your token ID. - Add
http://localhost:3000to the allowed CORS origins in your Sanity project settings.
Run Sanity Studio:
- Open a terminal at the sanity folder.
- Run
sanity installand thensanity start. - The Sanity Studio should be accessible at http://localhost:3333.
Run Astro Site:
- Open a terminal at the astro folder.
- Run
npm installand thennpm start. - The Astro site should be running at http://localhost:3000.
- To build for production locally, use
npm run build.
Summary:
The Astro Sanity Minimal Starter provides a simple yet powerful foundation for setting up a personal blog. By integrating a headless CMS with excellent SEO features and performance optimizations, this starter allows users to focus on content creation while retaining the flexibility to customize the look and behavior of their website. With easy installation steps and minimal styling, it offers a convenient solution for those looking to start a blog efficiently.