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.
Warning
The current handlers do not enforce authentication when the key query parameter is omitted. A public function URL is not a secret; do not expose these functions publicly until authentication is enforced or access is restricted outside the handlers.
Deployment, Algolia configuration, and Ghost webhook setup are described in the @tryghost/algolia-netlify guide.
The Netlify deployment publishes only a static landing page alongside the functions; repository package and function files are not site assets.
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.
The repository uses Nx to version packages independently. For routine releases, run one of the
root aliases from a clean checkout of main:
pnpm ship:patch
pnpm ship:minor
pnpm ship:majorTo release one package, call pnpm ship with its Nx project name. Preview the result first:
pnpm ship patch --projects=@tryghost/algolia --dry-run
pnpm ship patch --projects=@tryghost/algoliaship runs the test suite, updates the selected versions and their internal dependants, creates the
release commit and tags, then pushes them upstream. The Publish workflow
publishes those versions through npm trusted publishing. 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.