WP Manifestindependent plugin directory
manifest / integrations / rjm-gatsby-preview

RJM Gatsby Preview

Headless WordPress preview integration for RJM Gatsby websites

★ 0stars
2release downloads
v2.0.0latest · 1mo ago

Install

Download rjm-gatsby-preview-2.0.0.zip From the v2.0.0 release on GitHub, Sep 1, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/rjm-digital/rjm-gatsby-preview/releases/download/v2.0.0/rjm-gatsby-preview-2.0.0.zip
Updates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.

A WordPress plugin that redirects the native Preview action to a headless Gatsby website and authorizes preview-only WPGraphQL requests from its server-side preview function.

Responsibilities

This repository owns the universal WordPress integration:

  • Gatsby site URL and shared preview secret settings
  • Secure random secret generation
  • WordPress Preview link redirection
  • Preview-only WPGraphQL authentication
  • Automatic updates from GitHub Releases

The Gatsby /preview page, Netlify function, and site-specific GraphQL query generation remain in each website repository.

Requirements

  • WordPress 6.0 or later
  • PHP 8.0 or later
  • WPGraphQL
  • A Gatsby site with the RJM preview adapter

Installation

  1. Download the latest rjm-gatsby-preview-*.zip from GitHub Releases.
  2. In WordPress, open Plugins > Add New > Upload Plugin.
  3. Upload, install, and activate the plugin.
  4. Open Settings > RJM Gatsby Preview.
  5. Enter the Gatsby site URL and the same preview secret configured as PREVIEW_SECRET in Netlify.

WordPress will offer future GitHub Release versions through its normal plugin update screen.

Existing-site migration

The plugin preserves the existing rjm_gatsby_preview_settings option and the optional GATSBY_SITE_URL and GATSBY_PREVIEW_SECRET constants.

  1. Install and activate this standalone plugin.
  2. Confirm the existing values appear under Settings > RJM Gatsby Preview.
  3. Open a WordPress draft and verify its Gatsby Preview works.
  4. Remove the legacy wp-content/mu-plugins/gatsby-preview-redirect.php file.
  5. Verify Preview once more.

Do not leave both redirect implementations active after migration.

Release process

Prepare a release locally:

bash scripts/release-plugin.sh patch

Review and commit the version change, then create and push the matching tag:

git tag v2.0.1
git push origin main v2.0.1

GitHub Actions runs PHP lint and contract tests, builds the WordPress-compatible ZIP, and attaches it to the GitHub Release.

Security model

The shared secret is treated as a bearer credential. Authentication is considered only for POST requests to the configured WPGraphQL endpoint whose operation requests asPreview: true. Mutations and subscriptions are rejected by this authentication path.

Keep the preview secret out of source control and rotate it if it appears in logs or browser history outside the intended administrator workflow.

License

GPL-2.0-or-later.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v2.0.0 latest
Sep 1, 2026 1mo ago
rjm-gatsby-preview-2.0.0.zip
2