Skip to content

Commit

Permalink
fix: 修复了分词的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
pysio2007 committed Oct 7, 2024
1 parent bcfed01 commit 1cc8b2d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -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),
},
},
},

0 comments on commit 1cc8b2d

Please sign in to comment.