Astro Sanity Minimal Starter screenshot

Astro Sanity Minimal Starter

Author Avatar Theme by Treefarmstudio
Updated: 15 Oct 2022
105 Stars

Categories

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:

  1. Create a repository from this template.
  2. If you don’t have the Sanity CLI installed, run npm install -g @sanity/cli in a terminal.
  3. Open a terminal from the root folder of the project.
  4. Change directory to the sanity folder (cd sanity).
  5. Run sanity install to install the required dependencies.
  6. Run sanity init and follow the prompts to set up Sanity (you will need to create a Sanity account if you haven’t already).
  7. Navigate to the astro folder.
  8. Rename the .env.template file to .env.
  9. Replace the value of PUBLIC_SANITY_PROJECT_ID with your token ID.
  10. Note: You will need to add http://localhost:3000 to your allowed CORS origins in your Sanity project settings at https://manage.sanity.io.
  11. To run the Sanity Studio, open a terminal located at the sanity folder.
  12. Run sanity install to install the required dependencies.
  13. Run sanity start to start the Sanity Studio (it should be running on http://localhost:3333).
  14. Open http://localhost:3333 and copy the project ID from the Project info section.
  15. To run the Astro site, open a terminal located at the astro folder.
  16. Run npm install to install the required dependencies.
  17. Run npm start to start the Astro site (it should be running on http://localhost:3000).
  18. 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.