JavaScript tools for turning Ghost posts into records and keeping an Algolia search index up to date.
Important
Maintenance of this repository has resumed. The CLI supports Ghost 6 by requesting up to 100 posts at a time and following Ghost's pagination metadata until every post has been fetched.
This pnpm monorepo contains five packages:
@tryghost/algoliaprovides a CLI for initially indexing a Ghost site's published posts.@tryghost/algolia-netlifyprovides Netlify Functions that process Ghost post webhooks and update an index.@tryghost/algolia-fragmenterconverts Ghost posts into Algolia records and splits their HTML by heading.@tryghost/algolia-indexermanages Algolia index settings, records, and deletions.@tryghost/algolia-html-extractorextracts ordered text fragments from rendered Ghost HTML.
Existing Netlify installations keep their current build settings and webhook behavior. No configuration changes are required.
The button opts into release-based deployments, creates a copy in your GitHub account, and guides you through configuration. Start with an existing Algolia index, or import your posts with the CLI. After deploying, open your Netlify site to get the webhook URLs for Ghost.
See the setup guide for the required credentials and existing-installation instructions if search is already running. After opting in, rebuilds receive compatible patch and minor releases, including from forks. Major upgrades require your selection.
Use the CLI for the initial batch index of a site's published posts. Installation, configuration, and command options are documented in the @tryghost/algolia guide.
Use the Node version declared in .nvmrc, then install the monorepo dependencies and link its workspaces:
pnpm installRun the full test suite, including package lint checks:
pnpm testRun only the lint and formatting checks across the packages:
pnpm lintPackage-specific development and verification commands are documented in each package README. To test Netlify changes before merging, follow Testing a Netlify prerelease.
Include an Nx version plan with each change that needs a package release:
pnpm exec nx release plan --projects=@tryghost/algoliaChoose the bump, describe what someone upgrading needs to know, and commit the generated file in .nx/version-plans/ with the change. Create a separate plan for each package so maintainers can release them independently. Keep this directory for version plans only.
Pull requests that change package source need a version plan; documentation and test-only changes do not.
From a clean checkout of main, preview the release, then ship it:
pnpm ship --dry-run
pnpm shipship runs the tests, applies the plans, and generates each released package's CHANGELOG.md. It commits the version changes, changelogs, and consumed plans together, creates the tags, and pushes them. With no plans, it releases nothing.
If the push fails after the release commit is created, fix the Git error and run git push --atomic --follow-tags to the same remote. This pushes the prepared release without changing versions again.
To release one package, add its Nx project name to both commands:
pnpm ship --projects=@tryghost/algolia --dry-run
pnpm ship --projects=@tryghost/algoliaNx may also update internal dependants. Plans for other packages remain pending. A plan that spans selected and unselected packages must be split before a scoped release.
For a release without plans, the explicit pnpm ship patch, pnpm ship minor, and pnpm ship major overrides remain available, along with their ship:patch, ship:minor, and ship:major aliases. Preview and scope these commands as needed. Explicit stable releases require no pending version plans.
The Publish workflow publishes through npm trusted publishing. After publication, it promotes the Netlify package version as a GitHub Release with the generated changelog entry. Netlify and npm use the same version. See the deployment policy for release prerequisites and verification. Never run npm publish by hand.
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.