Overview
Astro Sanity Minimal Starter is a starter repository that provides a minimal blog website with a headless CMS setup using Sanity.io. It offers excellent SEO practices, a customizable headless CMS, and minimal styles, making it a solid foundation for a personal blog.
Features
- Customizable Headless CMS with Sanity.io: Allows for easy content management and customization.
- Excellent SEO Built In: Provides built-in search engine optimization features for better visibility.
- Open Graph Tags: Generates social media tags for platforms like Twitter and Facebook.
- User Declared Canonical URLs: Allows users to define their preferred canonical URLs for better SEO.
- RSS Feed: Generates a feed of blog posts in the RSS format for easy syndication.
- XML Sitemap: Automatically generates a sitemap for better search engine crawling.
- Robots.txt: Provides a robots.txt file for controlling search engine crawling behavior.
- JSON LD Schema: Generates structured data using JSON-LD format for better search engine understanding.
- Extremely Minimal Styles: Provides a bare bones starter with minimal predefined styles.
- Performant Google Fonts Setup: Implements a performant setup for using Google Fonts.
Installation
To install Astro Sanity Minimal Starter, follow these steps:
- Create a repository from this template.
- If you don’t have the Sanity CLI installed, run
npm install -g @sanity/cliin a terminal. - Open a terminal from the root folder of the project.
- Change directory to the
sanityfolder (cd sanity). - Run
sanity installto install the required dependencies. - Run
sanity initand follow the prompts to set up Sanity (you will need to create a Sanity account if you haven’t already). - Navigate to the
astrofolder. - Rename the
.env.templatefile to.env. - Replace the value of
PUBLIC_SANITY_PROJECT_IDwith your token ID. - Note: You will need to add
http://localhost:3000to your allowed CORS origins in your Sanity project settings athttps://manage.sanity.io. - To run the Sanity Studio, open a terminal located at the
sanityfolder. - Run
sanity installto install the required dependencies. - Run
sanity startto start the Sanity Studio (it should be running onhttp://localhost:3333). - Open
http://localhost:3333and copy the project ID from the Project info section. - To run the Astro site, open a terminal located at the
astrofolder. - Run
npm installto install the required dependencies. - Run
npm startto start the Astro site (it should be running onhttp://localhost:3000). - To build the site for production locally, run
npm run build.
Summary
Astro Sanity Minimal Starter is a solid foundation for a personal blog with a headless CMS setup using Sanity.io. It offers excellent SEO practices, customizable features, and minimal styles. By following the installation guide, users can easily set up and customize their blog website using Astro Sanity Minimal Starter.