TryGhost / TryGhost/algolia

Configurable indexing of gated (members-only and paid) Ghost content

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
22
Forks
19
Avg merge
18h 31m
Merged PRs (30d)
50

Description

Problem

Ghost sites with members-only or paid posts get no search coverage for that content. The Content API returns html: null for gated posts, so they produce no Algolia records at all. Publishers currently have no way to decide whether or how gated content appears in their index.

Discovered while investigating live-smoke evidence: main.ghost.is returns html: null for some posts (there they are empty public posts, but the same API behaviour applies to gated posts). Actions runs 32368632595 and 32372419243 of the Live Ghost content smoke workflow fail schema-drift on those items.

Proposal: an excerpt-first option

A configurable option letting publishers choose how gated Ghost content is indexed, with three levels:

Default — current behaviour. No change for existing users.

Metadata-only mode. A gated post becomes one metadata-only Algolia record: title, custom_excerpt/excerpt, feature image, tags, authors, and url. This leaks nothing beyond what Ghost's own public site already shows for gated posts (title, excerpt, and a call to action). The mechanism largely exists: the fallback record shipped for #220 in #237 already emits exactly this shape for Ghost content with no extraction fragments, and visibility is already an optional projection field in the shipped allowlist, so result UIs can badge or filter gated results today. The main coupling is that #221 and #222 must decide whether html: null maps to the fallback-record path, is skipped, or stays a validation failure — this request argues for making that a publisher-facing choice.

Full-content mode — a much larger decision. Indexing complete gated content requires the Admin API, a far heavier credential in CLI configuration and the Netlify environment, and creates a real exposure path: Algolia indexes are usually queried with a public search key, so highlights and snippets would leak paid prose unless the operator uses secured API keys or a separate protected index. This should not be conflated with the excerpt-level option and needs its own threat model if pursued.

Open questions

  1. What does the Content API actually return for a members-only post's computed excerpt and custom_excerpt? main.ghost.is could not answer this — its null-html posts are all public. If the computed excerpt is gated too, the metadata-only record rests on custom_excerpt plus metadata.
  2. How the option is expressed: CLI configuration and Netlify environment parity with existing patterns such as contentTypes and ALGOLIA_CONTENT_PROJECTION, and its interaction with the html: null mapping decision in #221/#222.
  3. Whether gated pages, not just posts, are in scope.

Relations

  • Feeds a future decision under PRD #213; not ready to implement as filed.
  • Builds on the fallback record mechanism from #220 (shipped in #237).
  • Couples to the html: null handling decision in #221 and #222.
  • Adjacent to, but separate from, the pending live-smoke schema amendment for null-html items.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the fallback-record work in #220 and #237, then review the html:null handling discussions in #221 and #222 and the future decision in PRD #213. Verify the Content API fields for gated posts and resolve the option's scope, configuration, and security model; done means an approved, implementable specification rather than a patch.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.