https://github.com/hypervillain/fortinet-next-example
https://github.com/hypervillain/fortinet-next-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hypervillain/fortinet-next-example
- Owner: hypervillain
- Created: 2020-08-26T14:33:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-26T14:41:46.000Z (almost 5 years ago)
- Last Synced: 2025-02-02T20:55:40.282Z (5 months ago)
- Language: JavaScript
- Size: 101 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app).
### What I did
I bootstrapped a SliceMachine project (canary version of Prismic) running:
```bash
npx prismic-cli@beta sm --setup
````I then went to my Prismic dashboard and opened the newly created repo.
Inside my Documents page, I created a doc of type `Page`, with uid `my-page`.I copy-pasted [this code](https://www.slicemachine.dev/documentation/next/next-slicezone) to `/pages/[uid].js`, ran `yarn dev` and accessed `localhost:3000/my-page`.
Then, I enjoyed 👍
Read `slices/CallToAction` to understand how to create your own slices. They will be automatically mapped by the SliceZone (api: 'my_slice', code: 'MySlice')
### What is left to do
- add [preview code](https://github.com/vercel/next.js/tree/canary/examples/cms-prismic/pages/api) at `/pages/api/preview.js`
- update your Prismic repository so that clicking "Preview" correctly redirects thereCheers!