Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 859 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 859 Bytes

Blogging with Sanity and Next.js

Read the tutorial

Get started

# Install the Sanity command line interface
~/
> npm i -g @sanity/cli

# Install Sanity in a separate folder
~/blog-backend
> sanity init

# Insert the projectId and dataset name from Sanity in client.js
~/sanity-blog-tutorial
> nano client.js

# Install frontend dependencies
~/sanity-blog-tutorial
> npm install

# Run Next.js in development mode
~/sanity-blog-tutorial
> npm run dev

Deploy as a static site

Read the tutorial

~/sanity-blog-tutorial
npm run export
# exports your site as static files in /out