Last active
November 23, 2019 05:06
-
-
Save Epotignano/185f4a592ded2ad48f31216f777c1e74 to your computer and use it in GitHub Desktop.
gatsby-config for integrate Prismic and Gatsby Image
This file contains hidden or 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
| plugins: [ | |
| /** | |
| Something else that you have in your config | |
| **/ | |
| { | |
| resolve: `gatsby-source-filesystem`, | |
| options: { | |
| name: `images`, | |
| path: `${__dirname}/src/images`, | |
| }, | |
| }, | |
| `gatsby-transformer-sharp`, | |
| `gatsby-plugin-sharp`, | |
| /** | |
| Something else that you have in your config | |
| **/ | |
| { | |
| resolve: 'gatsby-source-prismic', | |
| options: { | |
| repositoryName: <your-prismic-repository>, | |
| accessToken: <your-prismic-master-access-token>, | |
| linkResolver: ({ node, key, value }) => doc => { | |
| // Your link resolver | |
| }, | |
| fetchLinks: [ | |
| // Your list of links | |
| ], | |
| htmlSerializer: ({ node, key, value }) => ( | |
| type, | |
| element, | |
| content, | |
| children, | |
| ) => { | |
| // Your HTML serializer | |
| }, | |
| schemas: { | |
| // Your custom types mapped to schemas | |
| }, | |
| lang: '*', | |
| shouldNormalizeImage: ({ node, key, value }) => { | |
| // Return true to normalize the image or false to skip. | |
| }, | |
| }, | |
| /** | |
| Something else that you have in your config | |
| **/ | |
| }] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment