Skip to content

Commit 5138d0d

Browse files
author
JavasHub
committed
update theme
1 parent 8ed20ca commit 5138d0d

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/.vuepress/config.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import theme from "./theme.js";
55

66

77
export default defineUserConfig({
8+
89
base: "/",
910

1011
lang: "zh-CN",
@@ -13,6 +14,18 @@ export default defineUserConfig({
1314

1415
theme,
1516

17+
// index.html中注入 head 参考:https://theme-hope.vuejs.press/zh/guide/customize/font.html#%E4%BA%BA%E4%BA%BA%E7%94%9F%E8%80%8C%E8%87%AA%E7%94%B1
18+
head: [
19+
[
20+
`link`,
21+
{ rel: `stylesheet` , href: `https://cdn.jsdelivr.net/npm/@docsearch/css@3`}
22+
],
23+
[
24+
`script`,
25+
{ src: `https://cdn.jsdelivr.net/npm/@docsearch/js@3`}
26+
]
27+
],
28+
1629
// 对更低版本的浏览器提供支持
1730
extendsBundlerOptions: (config, app) => {
1831
addViteConfig(config, app, {
@@ -24,17 +37,7 @@ export default defineUserConfig({
2437
});
2538
},
2639

27-
// index.html中注入 head 参考:https://theme-hope.vuejs.press/zh/guide/customize/font.html#%E4%BA%BA%E4%BA%BA%E7%94%9F%E8%80%8C%E8%87%AA%E7%94%B1
28-
head: [
29-
[
30-
"link",
31-
{ rel: "stylesheet" , href: "https://cdn.jsdelivr.net/npm/@docsearch/css@3"}
32-
],
33-
[
34-
"script",
35-
{ src: "https://cdn.jsdelivr.net/npm/@docsearch/js@3"}
36-
]
37-
]
40+
3841

3942
// 和 PWA 一起启用
4043
// shouldPrefetch: false,

0 commit comments

Comments
 (0)