Overview:
The project is a web application that requires the installation of dependencies using Sanity globally. Users will need to follow specific steps to create a file and set up environment variables before running the development server.
Features:
- Dependency Installation: Users need to install dependencies, ensuring Sanity is installed globally.
- Environment Variable Setup: Create a .env.local file with key-value pairs for Sanity URLs and tokens.
- Data Queries: Customize or use predefined queries to fetch data from Sanity.
- Development Server: Once set up, users can run the development server to view the project.
Installation:
- Install project dependencies by ensuring Sanity is installed globally.
- Create a file named
.env.local
. - Insert the following key-value pairs in the
.env.local
file:NEXT_PUBLIC_SANITY_URL="" NEXT_PUBLIC_SANITY_LATEST_PROJECTS="" NEXT_PUBLIC_SANITY_ALL_PROJECTS="" NEXT_PUBLIC_SANITY_PROJECTS="" NEXT_PUBLIC_SANITY_PROJECT_BY_CATEGORY="" NEXT_PUBLIC_SANITY_TOKEN=""
- Create a token in Sanity Studio and place it in
NEXT_PUBLIC_SANITY_TOKEN
. - Customize or create queries for fetching data from Sanity.
- Run the development server to start the project.
Summary:
The project involves setting up environment variables and installing dependencies for a web application that interacts with Sanity for data management. By following the steps provided, users can create the necessary configuration and run the development server to view the project.