Skip to content

Commit d6bab55

Browse files
committed
feat(fuse): add full content for fust list generate
1 parent 388bdc3 commit d6bab55

File tree

5 files changed

+29
-74
lines changed

5 files changed

+29
-74
lines changed

demo/yun/public/fuse-list.json

-1
This file was deleted.

packages/devtools/build.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineBuildConfig({
1414
// in valaxy
1515
'valaxy',
1616
'valaxy/node',
17+
'consola/utils',
1718
],
1819
rollup: {
1920
dts: {

packages/valaxy/node/modules/fuse.ts

+7
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ export async function generateFuseList(options: ResolvedValaxyOptions) {
5959
link: encodeURI(link),
6060
}
6161

62+
/**
63+
* 全文搜索
64+
*/
65+
if (options.config.siteConfig.fuse.options.keys?.includes('content')) {
66+
fuseListItem.content = content
67+
}
68+
6269
extendKeys.forEach((key) => {
6370
fuseListItem[key] = fmData[key] || ''
6471
})

packages/valaxy/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
"@intlify/unplugin-vue-i18n": "^6.0.3",
6868
"@shikijs/transformers": "^3.1.0",
6969
"@types/katex": "^0.16.7",
70-
"@unhead/addons": "^2.0.0-rc.9",
71-
"@unhead/schema-org": "^2.0.0-rc.9",
72-
"@unhead/vue": "^2.0.0-rc.9",
70+
"@unhead/addons": "1",
71+
"@unhead/schema-org": "1",
72+
"@unhead/vue": "1",
7373
"@valaxyjs/devtools": "workspace:*",
7474
"@valaxyjs/utils": "workspace:*",
7575
"@vitejs/plugin-vue": "^5.2.1",
@@ -124,6 +124,7 @@
124124
"shiki": "^3.1.0",
125125
"star-markdown-css": "^0.5.3",
126126
"table": "^6.9.0",
127+
"unhead": "1",
127128
"unocss": "^66.0.0",
128129
"unplugin-vue-components": "28.0.0",
129130
"unplugin-vue-markdown": "^28.3.1",

pnpm-lock.yaml

+17-70
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)