-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to setup Prismic
Add and manage your content easily with Prismic by creating an account here!
On Prismic, create a new project and select the Gatsby as the technology used in the codebase.
Create your first document type and name it homepage
. To quickly get through the page creation, copy the entire content of the src/schemas/homepage.json
file in the JSON editor side panel then save it.
Navigate through the Documents
section and create your first document. It should be a homepage
document as you previously created its document type. Then you can add some content in the empty fields. Once it's done, you can save and publish your changes.
In order to be able to query your content from the front-end of your app you'll need the Prismic secrets of your project. To create them, navigate to the API and Security
section and generate an access token by adding the name of your application name (no need to add a Callback URL) then click on the Add this application
button.
You should now have a permanent access token. Copy it and past it in your .env
file for the PRISMIC_ACCESS_TOKEN
key. Don't forget to also add the PRISMIC_REPOSITORY_NAME
in your .env too.
If you already have (or haven't) created your Netlify account and connected your Github project, you can also add these environment variables following this documentation.