让 Ghost Native Search 支持中文搜索
Ghost 的 Native Search 功能是基于 Flexsearch 实现的 solo-search,但是 Ghost 把 Flexsearch 的搜索参数写死了,这些参数仅适用于英语这样的字母语言,而对于 CJK 语言,几乎无法正常使用。
好在 Ghost 提供了一个设置项,可以自定义 solo-search 的 js css url。可以对 solo-search 的源代码做修改,自己编译一份文件使用。
support chinese · TryGhost/Ghost@4e738e4
Independent technology for modern publishing, memberships, subscriptions and newsletters. - support chinese · TryGhost/Ghost@4e738e4
新版
Improve sodo-search for CJK by shincurry · Pull Request #21148 · TryGhost/Ghost
According to the flexsearch documentation,
https://github.com/nextapps-de/flexsearch?tab=readme-ov-file#cjk-word-break-chinese-japanese-korean
for searching CJK text, need to pass in a custom encod…
GitHub - shincurry/Ghost at sodo-search-cjk
Independent technology for modern publishing, memberships, subscriptions and newsletters. - GitHub - shincurry/Ghost at sodo-search-cjk
更新
ghost v5.96 已官方支持中文搜索以及i18n。