More Premium Hugo Themes Premium Astro Themes

Sanity Template Astro Clean

Clean starter template with Astro

Sanity Template Astro Clean

Clean starter template with Astro

Author Avatar Theme by sanity-io
Github Stars Github Stars: 143
Last Commit Last Commit: Mar 17, 2025 -
First Commit Created: Dec 18, 2023 -
default image

Overview

This product analysis is about a minimal Astro site with Sanity Studio. The starter uses Astro for the front end and Sanity to handle its content. It provides features such as fetching content from the Sanity Content Lake, rendering block content with Portable Text, a Sanity Studio for content creation and editing, and cropping and rendering images with Sanity Image URLs.

Features

  • Fetching content as data from the Sanity Content Lake
  • Rendering block content with Portable Text
  • Sanity Studio for content creation and editing
  • Cropping and rendering images with Sanity Image URLs

Installation

To install the theme, follow these steps:

  1. Ensure that you have Node.js (v16.12 or later) installed.
  2. Run the following command to install dependencies: npm install.
  3. Run the command npx sanity@latest init --env (or sanity init --env if you have the CLI installed). This command will ask you to select or create a Sanity project and dataset, and output a .env file with appropriate variables.
  4. Rename the variables in the .env file as follows:
    • Change SANITY_STUDIO_PROJECT_ID to PUBLIC_SANITY_STUDIO_PROJECT_ID.
    • Change SANITY_STUDIO_DATASET to PUBLIC_SANITY_STUDIO_DATASET.
  5. Run the command npm run dev to start the development server.
  6. Your Astro app should now be running on http://localhost:4321/ and the Studio on http://localhost:4321/admin.
  7. Visit the Studio and create and publish a new Post document.
  8. Visit the homepage and refresh the page to see your content rendered on the page.
  9. You can add more document types to the Studio to suit your needs by defining the schema in the /schema folder.

Summary

This product analysis discussed a minimal Astro site with Sanity Studio. It highlighted the key features such as fetching content from the Sanity Content Lake, rendering block content with Portable Text, utilizing a Sanity Studio for content creation and editing, and cropping and rendering images with Sanity Image URLs. The installation guide provided step-by-step instructions to set up the theme, including installing dependencies, configuring the environment variables, and starting the development server. Overall, this starter pack seems to be a convenient solution for building a website with Astro and managing content with Sanity Studio.