Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

An example of a Sanity powered frontend using Next.js

NotificationsYou must be signed in to change notification settings

sanity-io/example-frontend-next-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEMO 👉https://example-frontend-next-js.sanity-io.now.sh

This is an exampleSanity powered frontend for the movie dataset usingNext.js.

Prerequisites

You will needNode.js version 8.0 or greater installed on your system.

Setup

Get the code by either cloning this repository using git

git clone https://github.com/sanity-io/example-frontend-next-js.git

... ordownloading source code code as a zip archive.

Once downloaded, open the terminal in the project directory, and install dependencies with:

npm install

If you're running your own Sanity project with the example movie dataset, go tolib/sanity.js and change the following lines:

  projectId: 'YOUR_PROJECT_ID',  dataset: 'NAME_OF_YOUR_DATASET',

You can locate the ID of your project in the header of themanagement page for your project.

You also need to enablelocalhost:3000 in your CORS Origins settings! Either through themanagement page undersettings or by running the below in the project folder you set up withsanity init:

sanity cors add http://localhost:3000

Then start the example app with:

npm run dev

The app should now be up and running athttp://localhost:3000 🚀

About

An example of a Sanity powered frontend using Next.js

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp