Skip to content

v1.1.3 - Support non-public posts searching

Choose a tag to compare

@MFYDev MFYDev released this 13 Apr 19:55
· 85 commits to main since this release

This release introduces a significant change to authentication and enhances the search experience by allowing non-public posts to be searchable while hiding their full content in results.

🚨 Breaking Change: Authentication Update

  • Switched from Ghost Content API Key to Ghost Admin API Key: To enable fetching content for all posts (including non-public ones), the integration now requires a Ghost Admin API Key instead of the Content API Key for the webhook handler.
  • Action Required:
    1. Generate a new Admin API Key in your Ghost Admin panel (Settings → Integrations → Add custom integration).
    2. Update the environment variable for your webhook deployment (Netlify, Vercel, Cloudflare Worker, self-hosted Docker, etc.) from GHOST_KEY (or the old variable name you used) to GHOST_ADMIN_API_KEY and set its value to the newly generated Admin API Key.
    3. Ensure your webhook handler deployment is updated with the latest code changes (v1.1.3 or later).
    4. The CLI tool (@fanyangmeng/ghost-meilisearch-cli) still uses the Content API Key specified in your config.json for the initial bulk sync. No changes are needed there unless you regenerate that key.

✨ New Features & Improvements

  • Index All Published Posts: The webhook handler now indexes all published posts, regardless of their visibility (public, members, paid). Previously, only public posts were indexed.
  • Hide Non-Public Content in Search Results:
    • The search UI (@fanyangmeng/ghost-meilisearch-search-ui) has been updated to respect post visibility.
    • For non-public posts, search results will now only display the post title and the excerpt. The full content (plaintext) will not be shown in the search results for these posts, protecting members-only/paid content.
    • Public posts will continue to show the title and a highlighted content snippet as before.
  • Visibility Field Added: A visibility field is now added to each document indexed in Meilisearch. This field is filterable.

⬆️ Dependency Updates

  • Updated various dependencies across the monorepo, including jose (for JWT generation), zod, typescript, and build tools.
  • Bumped package versions:
    • @fanyangmeng/ghost-meilisearch (root): 1.1.3
    • @fanyangmeng/ghost-meilisearch-cli: 1.1.3
    • @fanyangmeng/ghost-meilisearch-config: 1.1.3
    • @fanyangmeng/ghost-meilisearch-core: 1.1.3
    • @fanyangmeng/ghost-meilisearch-search-ui: 1.1.3
    • @fanyangmeng/ghost-meilisearch-webhook-handler: 1.1.3

📄 Documentation

  • Updated README.md to reflect the Admin API Key requirement and new environment variable name (GHOST_ADMIN_API_KEY).
  • Updated CDN links and installation commands to use version 1.1.3.