v1.1.3 - Support non-public posts searching
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:
- Generate a new Admin API Key in your Ghost Admin panel (Settings → Integrations → Add custom integration).
- 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) toGHOST_ADMIN_API_KEYand set its value to the newly generated Admin API Key. - Ensure your webhook handler deployment is updated with the latest code changes (
v1.1.3or later). - The CLI tool (
@fanyangmeng/ghost-meilisearch-cli) still uses the Content API Key specified in yourconfig.jsonfor 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, onlypublicposts 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.
- The search UI (
- Visibility Field Added: A
visibilityfield 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.mdto 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.