You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a suggestion for improving the Algolia integration for Ghost CMS when building an index using yarn algolia index.
Description of the Improvement Opportunity
Taking a closer look at the code that transforms Ghost posts for the Algolia index, we can see the following snippet:
Here, only the raw HTML text of the post is passed as the text content for Algolia (html: post.html). This leads to HTML tags being displayed in the search preview on Algolia, which doesn't look visually appealing.
Proposed Enhancement
My suggestion would be to add an additional excerpt field alongside the html field. For this, we could use the excerpt (preview text) of the Ghost post, which doesn't contain any HTML tags. The transformed Algolia object would then look like this:
This excerpt could then be displayed as the preview text in the search results on Algolia, without any HTML tags being visible. This would significantly improve the presentation of the search results and make it more user-friendly. I would greatly appreciate any feedback on this proposal! Please let me know if you have any questions.
The text was updated successfully, but these errors were encountered:
I have a suggestion for improving the Algolia integration for Ghost CMS when building an index using yarn algolia index.
Description of the Improvement Opportunity
Taking a closer look at the code that transforms Ghost posts for the Algolia index, we can see the following snippet:
Here, only the raw HTML text of the post is passed as the text content for Algolia (html: post.html). This leads to HTML tags being displayed in the search preview on Algolia, which doesn't look visually appealing.
Proposed Enhancement
My suggestion would be to add an additional excerpt field alongside the html field. For this, we could use the excerpt (preview text) of the Ghost post, which doesn't contain any HTML tags. The transformed Algolia object would then look like this:
This excerpt could then be displayed as the preview text in the search results on Algolia, without any HTML tags being visible. This would significantly improve the presentation of the search results and make it more user-friendly. I would greatly appreciate any feedback on this proposal! Please let me know if you have any questions.
The text was updated successfully, but these errors were encountered: