- Notifications
You must be signed in to change notification settings - Fork156
An example of a Sanity powered frontend using Next.js
sanity-io/example-frontend-next-js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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.
You will needNode.js version 8.0 or greater installed on your system.
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 installIf 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:3000Then start the example app with:
npm run devThe 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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.