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:
- Ensure that you have Node.js (v16.12 or later) installed.
- Run the following command to install dependencies:
npm install. - Run the command
npx sanity@latest init --env(orsanity init --envif you have the CLI installed). This command will ask you to select or create a Sanity project and dataset, and output a.envfile with appropriate variables. - Rename the variables in the
.envfile as follows:- Change
SANITY_STUDIO_PROJECT_IDtoPUBLIC_SANITY_STUDIO_PROJECT_ID. - Change
SANITY_STUDIO_DATASETtoPUBLIC_SANITY_STUDIO_DATASET.
- Change
- Run the command
npm run devto start the development server. - Your Astro app should now be running on
http://localhost:4321/and the Studio onhttp://localhost:4321/admin. - Visit the Studio and create and publish a new Post document.
- Visit the homepage and refresh the page to see your content rendered on the page.
- You can add more document types to the Studio to suit your needs by defining the schema in the
/schemafolder.
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.