-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 535ece1
Showing
53 changed files
with
48,540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SANITY_STUDIO_API_PROJECT_ID = "wvv7gbzb" | ||
SANITY_STUDIO_API_DATASET = "production" | ||
|
||
NEXT_PUBLIC_SANITY_PROJECT_ID = "wvv7gbzb" | ||
NEXT_PUBLIC_SANITY_DATASET = "production" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# For Studio Locally | ||
SANITY_STUDIO_API_PROJECT_ID = "your_project_id" | ||
SANITY_STUDIO_API_DATASET = "production" | ||
|
||
# For Next Locally | ||
NEXT_PUBLIC_SANITY_PROJECT_ID = "your_project_id" | ||
NEXT_PUBLIC_SANITY_DATASET = "production" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.vscode | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": 1.00, | ||
"title": "Sanity Commerce Layer Starter", | ||
"description": "Sanity Ecommerce starter built with Next.js, Commerce Layer, and deployed to Netlify.", | ||
"previewMedia": { | ||
"type": "image", | ||
"src": ".sanity-template/screenshot.png", | ||
"alt": "Homepage UI" | ||
}, | ||
"technologies": [ | ||
{ | ||
"id": "nextjs", | ||
"name": "Next.js", | ||
"url": "https://nextjs.org" | ||
}, | ||
{ | ||
"id": "commercelayer", | ||
"name": "Commerce Layer", | ||
"url": "https://commercelayer.io" | ||
}, | ||
{ | ||
"id": "netlify", | ||
"name": "Netlify", | ||
"url": "https://netlify.com" | ||
} | ||
], | ||
"deployment": { | ||
"provider": "netlify", | ||
"studio": { | ||
"basePath": "/studio" | ||
}, | ||
"envVars": { | ||
"projectId": ["NEXT_PUBLIC_SANITY_PROJECT_ID"], | ||
"dataset": ["NEXT_PUBLIC_SANITY_DATASET"] | ||
}, | ||
"corsOrigins": [ | ||
{ | ||
"origin": "http://localhost:3000", | ||
"allowCredentials": true | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Sanity Commerce Layer Starter | ||
|
||
An ecommerce starter that features the sanity studio built with Next.js, Commerce Layer, and deployed to Netlify. | ||
|
||
## Installation guide | ||
|
||
- Rename `.env.test` to `.env` and add the project ID from [manage.sanity.io](https://manage.sanity.io). | ||
|
||
- Intall the neccessary packages and start the development server: | ||
|
||
```bash | ||
npm install && npm start | ||
``` | ||
|
||
This will run the frontend at `localhost:3000` and the Sanity Studio at `localhost:3000/studio`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"packages": [ | ||
"studio" | ||
], | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const STUDIO_REWRITE = { | ||
source: '/studio/:path*', | ||
destination: | ||
process.env.NODE_ENV === 'development' | ||
? 'http://localhost:3333/studio/:path*' | ||
: '/studio/index.html', | ||
} | ||
|
||
module.exports = { | ||
rewrites: () => [STUDIO_REWRITE], | ||
} |
Oops, something went wrong.