GithubHelp home page GithubHelp logo

astro-sanity-starterhjkgjhfdfghxgfn's Introduction

Astro Netlify Sanity Starter

Astro Netlify Sanity Starter

Live Demo

Netlify Astro and Sanity minimal starter with visual editing.

Prerequisites
Node.js v18.17.+
(optional) nvm for Node version management.

Getting Started

Create local project from this repo and run:

npm run install

Sign Into Sanity

If you are not already signed into Sanity via the CLI, install the CLI package and then run the login command.

npm install -g @sanity/cli
sanity login

This will open a browser and walk you through the authentication process.

Import Content

Once authenticated, you'll be able to create a Sanity project and import content.

npm run create-project

Note: You may want to sign into Sanity in the browser and rename your project.

Once the project exists and you've set the environment variables, you can import the content.

npm run import {projectId}

Replace {projectId} with the project ID output from the previous command.

Store Sanity Values

Sign into Sanity to create an editor token, navigate to the following address (replace the SANITY_PROJECT_ID with your project ID) https://www.sanity.io/manage/personal/project/SANITY_PROJECT_ID/api#tokens. Then create .env file in you repo, copy & paste the following environment variables into the file and set their values.

SANITY_PROJECT_ID="..."
SANITY_DATASET="..."
SANITY_TOKEN="..."

Run Sanity Studio

Sanity Studio code exists for this project in the studio directory. First, install the dependencies in this directory.

cd studio
npm install

Then run the studio locally.

npm start

If you want to see the content, you can open your browser and navigate to localhost:3333.

Run Sanity Studio

Sanity Studio code exists for this project in the studio directory. First, install the dependencies in this directory.

cd studio
npm install

Then run the studio locally.

npm start

If you want to see the content, you can open your browser and navigate to localhost:3333.

Start Development Server

Then you can run the Astro.js development server in root directory:

npm run dev

Install Netlify Create CLI:

npm install -g @stackbit/cli

And the Stackbit development server.

stackbit dev

This outputs your own Netlify Create URL. Open this, register or sign in, and you will be directed to Netlify Create's visual editor for your new project.

Next Steps

Here are a few suggestions on what to do next if you're new to Netlify visual editor:

Support

If you get stuck along the way, get help in our support forums.

astro-sanity-starterhjkgjhfdfghxgfn's People

Contributors

aitchiss avatar renovate[bot] avatar tomasbankauskas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.