Releases: MFYDev/ghost-meilisearch
v1.2.3
v1.2.2 - Member Only Content Support
Blog Post: Ghost-Meilisearch v1.2.2: Major Upgrade for Premium Content Support
Major Improvements
- Enhanced Content Processing: Replaced single plaintext field with new plaintext_public and plaintext_private fields to better handle membership content (Thanks for #13 ) using a divider marker (
<!--members-only-->
) to separate public and private content - Better Search Privacy: Private content is now properly segmented in the search index, ensuring that content behind membership walls is only searchable by members with appropriate access
- Improved Text Extraction: Completely rewritten HTML content processing with better handling for images, links, and structural elements to produce cleaner search results
Search UI Enhancements
- Updated search interface to properly display results based on content visibility
- Smarter snippet generation that properly respects public/private content boundaries
- Added support for better highlighting in search results
Bug Fixes & Technical Improvements
- Improved error handling throughout the codebase
- Enhanced webhook handler response formatting
- Better fallback mechanisms for content parsing
Upgrade Instructions
Please update all packages to version 1.2.2:
If using configuration methods, update the URL paths:
https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js
https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/styles.css
If using the CLI tool, upgrade to the latest version:
npm install -g @fanyangmeng/[email protected]
The update introduces a new index structure for better handling of members-only content. For the best results, I recommend reindexing your content after upgrading.
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_KEY
and set its value to the newly generated Admin API Key. - Ensure your webhook handler deployment is updated with the latest code changes (
v1.1.3
or later). - The CLI tool (
@fanyangmeng/ghost-meilisearch-cli
) still uses the Content API Key specified in yourconfig.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, onlypublic
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.
- The search UI (
- 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
.
v1.0.3 - Support AI Search
Release Notes - v1.0.3
This release introduces AI-powered search capabilities to the Ghost Meilisearch integration and updates core package versions.
✨ New Features
- AI Search (Semantic Search): Introduced optional AI-powered search functionality leveraging Meilisearch's hybrid search. When enabled, search results are intelligently ranked based on semantic meaning in addition to keywords. (Requires Meilisearch v1.3+ with a configured embedder).
- New Search UI Configuration: Added new options to
window.__MS_SEARCH_CONFIG__
to control AI search:enableAiSearch
(boolean, default:false
): Set totrue
to enable AI search.aiSearchEmbedder
(string, required ifenableAiSearch
is true): The name of the embedder configured in your Meilisearch instance (e.g.,"openai"
).aiSearchLimit
(number, default:3
): The maximum number of results to display in the "AI Suggestions" section.
🚀 Improvements
- Updated Search UI: The search modal now displays results in two distinct sections when AI search is enabled:
- AI Suggestions: Shows semantically relevant results (limited by
aiSearchLimit
). - Keyword Matches: Shows standard keyword-based results.
- AI Suggestions: Shows semantically relevant results (limited by
- Code Refactoring: Refactored internal Search UI code (
search.js
) for better structure, improved result highlighting, and more relevant excerpt snippet generation. - Styling: Updated CSS (
styles.css
) to accommodate the new AI results section.
⬆️ Dependency Updates
- Updated core packages to
v1.0.3
:@fanyangmeng/ghost-meilisearch-search-ui
@fanyangmeng/ghost-meilisearch-cli
@fanyangmeng/ghost-meilisearch-webhook-handler
@fanyangmeng/ghost-meilisearch-config
@fanyangmeng/ghost-meilisearch-core
- Updated various development dependencies in the root
package-lock.json
.
📄 Documentation
- Updated
README.md
with:- Instructions for configuring the new AI search options.
- Details on AI search requirements and behavior.
- Updated CDN URLs and package installation commands to reflect the new versions.
- Revised package version table.
⚙️ Configuration Changes & Notes
- AI Search Setup: If you wish to use the new AI Search feature, update your Search UI configuration (
window.__MS_SEARCH_CONFIG__
in Code Injection orsodoSearch
inconfig.[env].json
if self-hosting the UI script) to includeenableAiSearch: true
andaiSearchEmbedder: "your-embedder-name"
. Ensure your Meilisearch instance is latest and has the specified embedder configured. See Meilisearch AI Search Docs for details. - Update CLI: Update the CLI tool globally:
npm install -g @fanyangmeng/[email protected]
- Update Assets: Update the asset URLs in your Ghost configuration or Code Injection:
- JS:
https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js
- CSS:
https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/styles.css
- JS:
Quick fix for version, dependencies and executable #10
v0.5.1
Quick fix for exact search with double quotes
Please use this in your website with the 0.5.1 version
"sodoSearch": {
"url": "https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js"
}
v0.5.0
Ghost-Meilisearch 0.5.0 Release Notes
I'm excited to announce the release of Ghost-Meilisearch v0.5.0, which brings significant improvements to both search quality and user experience!
Major Changes
- Improved Search Accuracy: Complete overhaul of the search algorithm with exact phrase matching and better relevance sorting
- Enhanced Content Extraction: Added advanced plaintext extraction from HTML with better formatting preservation
- Upgraded Dependencies: All packages have been updated to the latest dependencies, including Meilisearch v0.49.0
Search Improvements
- Exact Phrase Matching: Added support for quoted search terms to find exact phrases
- Improved Plaintext Extraction: Better HTML parsing with Cheerio to create higher quality search indexes
- Enhanced Highlighting: More intelligent highlighting of search terms in both titles and content
- Smarter Results Ranking: Results are now sorted with exact matches first, followed by partial matches
Content Processing Enhancements
- HTML to Plaintext Conversion: Added Cheerio for robust HTML parsing across all platforms
- Structure Preservation: Better handling of lists, tables, and other structured content
- Image Alt Text Extraction: Alt text from images is now preserved in plaintext content
- Cleaner Link Handling: Link text is preserved in a more natural way
- Fallback Processing: Robust regex-based fallback if HTML parsing fails
Visual Improvements
- Better Highlighting: Search terms are now properly highlighted with improved styling
- Fixed Various UI Bugs: Better mobile display and more consistent styling
Technical Changes
- Updated Meilisearch: Now using Meilisearch v0.49.0 (up from v0.37.0)
- Updated Next.js Configuration: Modernized configuration for better performance
- Fixed Cloudflare Workers URL Format: Corrected the example URL format in documentation
- Corrected Index Name: Fixed a typo in the README where
ghost_post
is now correctlyghost_posts
- Consistent HTML Processing: The same HTML processing logic is now used in all webhook handlers (Netlify, Vercel, and Cloudflare)
All Packages Updated to v0.5.0
webhook-handler's latest version is v0.5.1
@fanyangmeng/ghost-meilisearch-search-ui
: Search interface that matches your Ghost theme@fanyangmeng/ghost-meilisearch-cli
: CLI tool for content syncing@fanyangmeng/ghost-meilisearch-webhook-handler
: Webhook handler for real-time updates@fanyangmeng/ghost-meilisearch-config
: Configuration utilities@fanyangmeng/ghost-meilisearch-core
: Core functionality
Upgrading
To upgrade from a previous version, update your package references to use v0.5.0 instead of v0.4.x in your configuration files and code injection headers.
For example, update your code injection from:
<script src="https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js"></script>
To:
<script src="https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js"></script>
Don't forget to also update the CSS reference if you're using it:
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/styles.css">
For CLI users, update with:
npm install -g @fanyangmeng/[email protected]
v0.4.3 - Fix Netlify API Key Error
Ghost-Meilisearch Integration v0.4.3 Release Notes
What's New
- Simplified webhook event handling: Streamlined the event processing logic to focus on just two main post events: post.added and post.updated instead of tracking multiple state changes separately.
- Improved logging: Added detailed logging throughout the webhook handler to provide better visibility into the processing of posts, making troubleshooting easier.
- Enhanced error handling: Improved signature verification with additional validation checks and better error reporting.
Bug Fixes
- Webhook signature verification: Fixed and reinforced the signature verification process with more robust error handling.
- More reliable post processing: Simplified the logic that determines when to index or remove posts from the search index, ensuring more consistent behavior.
Technical Improvements
- Optimized Netlify function handler: Refactored the Netlify function handler to be more lightweight and resilient to timeouts.
- Better error messages: Added more descriptive error messages and improved error handling throughout.
- Code simplification: Removed redundant conditional checks and simplified the overall control flow.
Affected Packages
- @fanyangmeng/ghost-meilisearch-webhook-handler: Updated to version 0.4.3
Upgrade Instructions
This is a drop-in replacement for the webhook handler. No configuration changes are required.
Full Changelog: v0.4.2...v0.4.3
v0.4.2
Ghost-Meilisearch v0.4.2 Release Notes
I am excited to announce the release of Ghost-Meilisearch v0.4.2, featuring numerous improvements in security, performance, and user experience. This update brings all packages in alignment with version 0.4.2 and introduces several important enhancements.
🔍 Search UI Improvements
- Added proper URL handling in search results - search results now link directly to the full URL instead of relying only on the slug
- Improved search modal behavior with smoother transitions - search UI now properly closes before navigation
- Fixed dark mode highlight color consistency - using #ff1a75 as the default highlight color in dark mode
🔧 API Key Management
- Added comprehensive documentation for creating proper API keys with limited permissions:
- Search-only key for frontend UI
- Writing key for webhook handler with minimal permissions
📝 Documentation Enhancements
- Added detailed instructions for creating API keys with proper permissions
- Improved webhook handler setup documentation with step-by-step guidance
- Updated configuration examples with latest package versions
- Added links to Ghost API documentation
👷 CI/CD Improvements
- Added Cloudflare Workers deployment workflow
- Optimized build process for Cloudflare deployments
🧩 Schema Updates
- Added
url
field to the default schema to support full URL linking
🔄 Dependency Updates
- Updated package dependencies to use versioned dependencies instead of file references
📦 Package Updates
Package | Previous Version | New Version |
---|---|---|
ghost-meilisearch-search-ui | 0.1.3 | 0.4.2 |
ghost-meilisearch-cli | 0.1.3 | 0.4.2 |
ghost-meilisearch-webhook-handler | 0.3.0 | 0.4.2 |
ghost-meilisearch-config | 0.1.0 | 0.4.2 |
ghost-meilisearch-core | 0.1.3 | 0.4.2 |
🔗 Installation & Upgrade
To upgrade to v0.4.2, update your configuration to use the new package versions:
"sodoSearch": {
"url": "https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js"
}
Or via code injection:
<script src="https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/search.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fanyangmeng/[email protected]/dist/styles.css">
For CLI tools, update to the latest version:
npm install -g @fanyangmeng/[email protected]
Acknowledgment
Thanks for @klafbang for the #2 , you actually help me noticed so many hidden bugs and improvements that I should pay attention to. Thank you for your support as well!
What's Changed
Full Changelog: v0.3.0...v0.4.2
v0.3.0 - Vercel Support
Added Vercel Webhook Handler Support
https://ghost-meilisearch.vercel.app/
- Implemented Edge Runtime compatible webhook handler for improved performance
- Added robust webhook signature verification using Web Crypto API for enhanced security
- Introduced intelligent event type detection for different post operations:
- Post creation
- Post updates
- Status changes
- Visibility changes
- Post deletions
- Added support for handling Ghost API content fetching with cache busting
- Implemented automatic synchronization with Meilisearch index based on post status
- Added timeout handling for all asynchronous operations (30s default)
- Included comprehensive error handling and detailed error messages
- Added environment variable validation for required configuration
- Implemented post transformation logic to format Ghost data for Meilisearch
- Added support for post metadata including tags and authors
- Optimized post processing with automatic removal of non-public/unpublished posts
Security
- Implemented webhook signature verification using HMAC SHA-256
- Added timestamp validation in webhook signatures
- Environment variable validation for secure configuration
Performance
- Deployed on Edge Runtime for minimal latency
- Implemented efficient post processing with proper type checking
- Added cache busting for Ghost API requests to ensure fresh content
Full Changelog: v0.2.1...v0.3.0
v0.2.1
Fix turbo build settings
Full Changelog: v0.2.0...v0.2.1