@magicpages/ghost-typesense-webhook 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +23 -1
  2. package/package.json +3 -3
  3. package/CHANGELOG.md +0 -46
package/README.md CHANGED
@@ -68,7 +68,29 @@ The webhook handler:
68
68
  1. Validates the secret in the URL query parameter
69
69
  2. Processes post status changes (publish/unpublish/update)
70
70
  3. Updates the Typesense index accordingly
71
-
71
+ 4. Automatically generates plaintext content from HTML for better search quality
72
+ 5. Ensures content is properly formatted for optimal search results
73
+
74
+ ### Content Processing
75
+
76
+ When a post is published or updated, the handler:
77
+
78
+ 1. **Fetches complete data**: Gets the full post details from Ghost including tags and authors
79
+ 2. **Transforms content**:
80
+ - Converts timestamps to numeric formats for sorting
81
+ - Extracts tag and author information
82
+ - Generates clean plaintext content from HTML by:
83
+ - Removing script and style tags with their content
84
+ - Replacing HTML tags with spaces to preserve word boundaries
85
+ - Normalizing whitespace
86
+ - Creating a clean, searchable text version
87
+ 3. **Updates index**: Adds or updates the document in Typesense with the transformed content
88
+ 4. **Optimizes for search**: Ensures the content is indexed in a way that enables:
89
+ - Context-aware search result highlighting
90
+ - Relevant excerpts showing search terms in context
91
+ - Accurate full-text search across all content
92
+
93
+ This automatic transformation ensures that your search index stays in sync with your Ghost content while providing the best possible search experience for your users.
72
94
 
73
95
  ## License
74
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicpages/ghost-typesense-webhook",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Webhook handler for real-time Ghost content synchronization with Typesense",
5
5
  "author": "MagicPages",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "typecheck": "tsc --noEmit"
19
19
  },
20
20
  "dependencies": {
21
- "@magicpages/ghost-typesense-config": "^1.5.0",
22
- "@magicpages/ghost-typesense-core": "^1.5.0",
21
+ "@magicpages/ghost-typesense-config": "^1.6.0",
22
+ "@magicpages/ghost-typesense-core": "^1.6.0",
23
23
  "@netlify/functions": "^2.5.1",
24
24
  "zod": "^3.22.4"
25
25
  },
package/CHANGELOG.md DELETED
@@ -1,46 +0,0 @@
1
- # @magicpages/ghost-typesense-webhook
2
-
3
- ## 2.0.0
4
-
5
- ### Major Changes
6
-
7
- - 3d371be: Initial release of Ghost Typesense integration packages:
8
- - Type-safe configuration and utilities
9
- - Core functionality for Ghost-Typesense synchronization
10
- - CLI tool for content management
11
- - Webhook handler for real-time updates
12
-
13
- ### Patch Changes
14
-
15
- - Updated dependencies [3d371be]
16
- - @magicpages/ghost-typesense-config@2.0.0
17
- - @magicpages/ghost-typesense-core@2.0.0
18
-
19
- ## 2.0.0
20
-
21
- ### Major Changes
22
-
23
- - 35c8344: Initial release of Ghost Typesense integration packages:
24
-
25
- ### Patch Changes
26
-
27
- - Updated dependencies [35c8344]
28
- - @magicpages/ghost-typesense-config@2.0.0
29
- - @magicpages/ghost-typesense-core@2.0.0
30
-
31
- ## 1.0.0
32
-
33
- ### Major Changes
34
-
35
- - ddd5315: Initial release of the Ghost Typesense integration packages:
36
-
37
- - CLI tool for managing Ghost content in Typesense
38
- - Webhook handler for real-time content synchronization
39
- - Core functionality for Ghost-Typesense integration
40
- - Configuration types and utilities
41
-
42
- ### Patch Changes
43
-
44
- - Updated dependencies [ddd5315]
45
- - @magicpages/ghost-typesense-core@1.0.0
46
- - @magicpages/ghost-typesense-config@1.0.0