Skip to content

Commit df56b6d

Browse files
committed
chore: fix dependency and theme setting
1 parent e70e1f7 commit df56b6d

File tree

3 files changed

+149
-40
lines changed

3 files changed

+149
-40
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@vuepress/bundler-webpack": "2.0.0-rc.19",
1717
"@vuepress/plugin-redirect": "2.0.0-rc.78",
1818
"@vuepress/plugin-register-components": "2.0.0-rc.66",
19+
"@vuepress/plugin-revealjs": "2.0.0-rc.47",
1920
"markmap-lib": "^0.18.11",
2021
"markmap-toolbar": "^0.18.10",
2122
"markmap-view": "^0.18.10",

pnpm-lock.yaml

Lines changed: 108 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.vuepress/theme.ts

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { hopeTheme } from "vuepress-theme-hope";
22
import { enSidebar, zhSidebar } from "./sidebar/index.js";
33

44
export default hopeTheme({
5-
6-
iconAssets: "fontawesome-with-brands",
75
repo: "dynilath/moder-cpp-primer",
86

97
docsDir: "src",
@@ -34,49 +32,53 @@ export default hopeTheme({
3432
components: ["Badge", "VPCard"],
3533
},
3634
redirect: {
37-
autoLocale: true
35+
autoLocale: true,
36+
},
37+
icon: {
38+
assets: "fontawesome-with-brands",
3839
},
39-
shiki: {
40+
},
41+
markdown: {
42+
align: true,
43+
attrs: true,
44+
codeTabs: true,
45+
component: true,
46+
demo: true,
47+
figure: true,
48+
imgLazyload: true,
49+
imgSize: true,
50+
include: true,
51+
mark: true,
52+
stylize: [
53+
{
54+
matcher: "Recommended",
55+
replacer: ({ tag }) => {
56+
if (tag === "em")
57+
return {
58+
tag: "Badge",
59+
attrs: { type: "tip" },
60+
content: "Recommended",
61+
};
62+
},
63+
},
64+
],
65+
sub: true,
66+
sup: true,
67+
tabs: true,
68+
vPre: true,
69+
mermaid: true,
70+
markmap: true,
71+
revealjs: {
72+
plugins: ["highlight", "math", "search", "notes", "zoom"],
73+
},
74+
highlighter: {
75+
type: "shiki",
4076
themes: { light: "github-light", dark: "github-dark" },
4177
langs: ["cpp", "powershell", "bash", "cmd"],
4278
notationDiff: true,
4379
notationHighlight: true,
4480
notationErrorLevel: true,
4581
notationWordHighlight: true,
4682
},
47-
mdEnhance: {
48-
align: true,
49-
attrs: true,
50-
codetabs: true,
51-
component: true,
52-
demo: true,
53-
figure: true,
54-
imgLazyload: true,
55-
imgSize: true,
56-
include: true,
57-
mark: true,
58-
stylize: [
59-
{
60-
matcher: "Recommended",
61-
replacer: ({ tag }) => {
62-
if (tag === "em")
63-
return {
64-
tag: "Badge",
65-
attrs: { type: "tip" },
66-
content: "Recommended",
67-
};
68-
},
69-
},
70-
],
71-
sub: true,
72-
sup: true,
73-
tabs: true,
74-
vPre: true,
75-
mermaid: true,
76-
markmap: true,
77-
revealJs: {
78-
plugins: ["highlight", "math", "search", "notes", "zoom"],
79-
},
80-
},
8183
},
8284
});

0 commit comments

Comments
 (0)