简体   繁体   English

如何使搜索引擎在 bookdown gitbook 中为多字节字符(尤其是日语)工作?

[英]How can I make the search engine work for multibyte characters (Japanese in particular) in bookdown gitbook?

I have built a gitbook with the bookdown package.我用bookdown package 构建了一个 gitbook。 The search engine does work for English-written parts of the text and codes (ie alphabet and numbers, basically), but I have found it doesn't work at all if I type in some Japanese words.搜索引擎确实适用于文本和代码的英文部分(即字母和数字,基本上),但我发现如果我输入一些日语单词,它根本不起作用。

Is there any ways to make that work?有什么方法可以使它起作用吗?

Thanks.谢谢。

This problem will be gone if you switch the search engine to fuse ( details here ):如果您将搜索引擎切换到fuse ,则此问题将消失( 详情请点击此处):

output:
  bookdown::gitbook:
    config:
      search:
        engine: fuse

Currently you need to install the dev version of bookdown :目前您需要安装bookdown的开发版本:

remotes::install_github('rstudio/bookdown')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM