Skip to content

内置搜索框无法搜索中文,但是搜索英文却可以(The built-in search box cannot search for Chinese, but it can search for English) #2279

Closed
@guestccc

Description

@guestccc
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

我现在拉一个新的模版下来也是会的,1.4.0 ,

  1. 全局安装 vuepress,版本1.4.0

  2. 文件目录

 ├── .vuepress (可选的)
 │   └── config.js (可选的)
 ├── about.md
 └── README.md

config.js文件

// config.js
module.exports = {
  themeConfig: {
    search: true,
    searchMaxSuggestions: 10
  }
}

about.md文件

//about.md
# 关于我们1

# ABOUT

## 关于我们

## about

README.md文件

// README.md
---
home: true
heroImage: /hero.png
heroText: Hero 标题
tagline: Hero 副标题
actionText: 快速上手 
actionLink: /zh/guide/
features:
- title: 简洁至上
  details:  Markdown 为中心的项目结构,以最少的配置帮助你专注于写作。
- title: Vue驱动
  details: 享受 Vue + webpack 的开发体验,在 Markdown 中使用 Vue 组件,同时可以使用 Vue 来开发自定义主题。
- title: 高性能
  details: VuePress 为每个页面预渲染生成静态的 HTML,同时在页面被加载的时候,将作为 SPA 运行。
footer: MIT Licensed | Copyright © 2018-present Evan You
---
  1. 执行vuepress dev .

项目成功跑在了localhost:8080

  1. 浏览项目,点击搜索框,分别搜索 about关于 两个关键字

What is expected?

预期:应该是中英文都可以搜索才对

What is actually happening?

浏览项目,点击搜索框搜索 about,成功搜索出有关 about 关键字的文章,但是当,搜索 关于 关键字时 ,却什么都没有

Other relevant information

这里提供一下我的blog,也是用的 vuepress 1.4.0 版本,也有这种问题

my blog --JSChen

  • Output of npx vuepress info in my VuePress project:

vuepress v1.4.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions