Hey everyone!
V4 of our Gatsby + Prismic integration has been released
Many new features and fixes are included as part of the updated plugins. Check out the full list below.
As a reminder, our Gatsby integration consists of two plugins:
- gatsby-source-prismic: Gatsby source plugin for building websites using Prismic as a data source
- gatsby-plugin-prismic-previews: Gatsby plugin for integrating client-side Prismic Previews
Getting Started
To learn more about how to get started with Gatsby and Prismic, you can check out the updated documentation here: Gatsby and Prismic - Prismic
Migrating to V4
To upgrade an existing Gatsby + Prismic project to the latest plugins, you can check out the migration guide here: Gatsby Migration Guide: gatsby-source-prismic V3 to V4 - Prismic
What has changed?
Prismic's Gatsby support has been split into two plugins: gatsby-source-prismic and gatsby-plugin-prismic-previews. New features and changes for each are described below.
gatsby-source-prismic
This plugin is used to pull CMS data into Gatsby using Prismic's REST API.
- Multiple repository support
- Validate plugin options
- Automatic Custom Types schema fetching (via the beta Custom Types API)
- gatsby-plugin-image support
- GraphQuery support (replacement for fetchLinks option)
- Serve media files from Link fields locally via localFile field
- Download image and media files only when queried for faster start-up times
- Full support for Embed fields with oEmbed data
- Full support for Integration Fields
- Private plugin options, including repository names, access tokens, and schemas
gatsby-plugin-prismic-previews
This plugin is used to provide live previews client-side directly from the Prismic editor. The following changes are made over the preview functionality previously provided by the gatsby-source-prismic plugin.
- Live refreshing as document changes are saved
- Preview changes across all data and pages, not just the previewed document's page
- Preview a release with multiple documents
- Sharable preview links
- Easier to use hooks and higher-order-components to integrate with your site
- Private access tokens (optional)
If you have any questions or run into issues with the new plugins, please feel free to reach out for help.
Asking a question: Open a new topic on our community forum explaining what you want to achieve / your question. Our support team will get back to you shortly.
Reporting a bug: Open an issue explaining your application's setup and the bug you're encountering.
Suggesting an improvement: Open an issue explaining your improvement or feature so we can discuss and learn more.
Submitting code changes: For small fixes, feel free to open a PR with a description of your changes. For large changes, please first open an issue so we can discuss if and how the changes should be implemented.
Happy coding!