From 1cc8b2d28468b1b30940e777252c963379bea44d Mon Sep 17 00:00:00 2001 From: Pysio Date: Mon, 7 Oct 2024 18:37:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=88=86?= =?UTF-8?q?=E8=AF=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/theme.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/.vuepress/theme.ts b/src/.vuepress/theme.ts index 30c47b82..b1b95585 100644 --- a/src/.vuepress/theme.ts +++ b/src/.vuepress/theme.ts @@ -2,8 +2,8 @@ import { hopeTheme } from "vuepress-theme-hope"; import gitDescribe from 'git-describe'; import navbar from "./navbar.js"; import sidebar from "./sidebar/index.js"; -// import pkg from 'nodejieba'; -// const { cut } = pkg; +import pkg from 'nodejieba'; +const { cut } = pkg; //Git Hash const gitInfo = gitDescribe.gitDescribeSync(); @@ -76,11 +76,11 @@ export default hopeTheme({ searchPro: { indexContent: true, indexLocaleOptions: { - // "/": { - // // 使用 nodejs-jieba 进行分词 - // tokenize: (text, fieldName) => - // fieldName === "id" ? [text] : cut(text, true), - // }, + "/": { + // 使用 nodejs-jieba 进行分词 + tokenize: (text, fieldName) => + fieldName === "id" ? [text] : cut(text, true), + }, }, },