oleeskild / obsidian-digital-garden

MIT License
1.33k stars 124 forks source link

[Feature request] Support for searching Chinese content #219

Closed ouyangzh-CN closed 1 year ago

ouyangzh-CN commented 1 year ago

chinese #search

First of all, I'd like to express my appreciation for your work. It's currently the most convenient and efficient way I've found to publish my Obsidian notes. Thank you for your hard work!

However, I noticed that the search function only works with English content. As a bilingual user who frequently writes notes in Chinese, I find it inconvenient that I cannot search for Chinese keywords in my published notes. I believe there are many other users who share the same need.

Therefore, I'd like to request that you consider adding support for searching Chinese content. I believe that this feature would greatly enhance the usability and accessibility of Publish for Chinese-speaking users.

Please let me know if I could help in any form.

Jackiexiao commented 1 year ago

I'm not familiar with js, but I think this is because lunr.js does not support searching in Chinese and other languages. Perhaps we can solve the issue of multilingual search (not just Chinese) by using the following library? just my two cents. @oleeskild

https://github.com/MihaiValentin/lunr-languages/

or support multi-language config just like https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#multiple-languages

GJRobert commented 1 year ago

Confirmed. UTF-8 characters does not seem to be searchable now :)

Lraxer commented 1 year ago

Since the template has replaced lunr.js with FlexSearch.js in oleeskild/digitalgarden#160 (thanks to oleeskild), we can search Chinese contents now. So I think this issue can be closed.

ouyangzh-CN commented 1 year ago

Chinese content can be searched now.

Crash2333 commented 1 year ago

I still can't search Chinese on my site. Update template to version 1.54.2 Do you need to do anything extra to support Chinese search? https://github.com/Crash2333/digitalgarden/pull/29

GJRobert commented 1 year ago

I still can't search Chinese on my site. Update template to version 1.54.2 Do you need to do anything extra to support Chinese search? Crash2333/digitalgarden#29

If you go to my site http://aiuanyu.vercel.app/ can you search for CJK characters on it? It seems to work on my sites.

Crash2333 commented 1 year ago

I still can't search Chinese on my site. Update template to version 1.54.2 Do you need to do anything extra to support Chinese search? Crash2333/digitalgarden#29

If you go to my site http://aiuanyu.vercel.app/ can you search for CJK characters on it? It seems to work on my sites.

I just crate PR but not to merge option This is my mistake sorry!!!