Skip to content

Commit

Permalink
chore: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
clark-cui committed Jun 1, 2024
1 parent b8ac972 commit 16a9a61
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 362 deletions.
12 changes: 6 additions & 6 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getPosts, getPostLength } from "./theme/serverUtils";
import { buildBlogRSS } from "./theme/rss";
import { transformerTwoslash } from "vitepress-plugin-twoslash";
import { transformerTwoslash } from "@shikijs/vitepress-twoslash";
import mathjax3 from "markdown-it-mathjax3";

async function config() {
Expand Down Expand Up @@ -99,11 +99,11 @@ async function config() {
md.use(mathjax3);
},
},
vite: {
ssr: {
noExternal: ["vitepress-plugin-twoslash"],
},
},
// vite: {
// ssr: {
// noExternal: ["vitepress-plugin-twoslash"],
// },
// },
};
}
export default config();
10 changes: 5 additions & 5 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import Theme from "vitepress/theme";
import Archives from "./components/Archives.vue";
import Tags from "./components/Tags.vue";
import MyLayout from "./components/MyLayout.vue";
import TwoSlashFloatingVue from "vitepress-plugin-twoslash/client";
import "vitepress-plugin-twoslash/style.css";
import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client";
import "@shikijs/vitepress-twoslash/style.css";
import type { EnhanceAppContext } from "vitepress";

import "./custom.css";

export default {
extends: Theme,
Layout: MyLayout,
enhanceApp({ app }) {
// register global components
enhanceApp({ app }: EnhanceAppContext) {
app.component("Archives", Archives);
app.component("Tags", Tags);
app.use(TwoSlashFloatingVue);
app.use(TwoslashFloatingVue);
},
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "MIT",
"type": "module",
"devDependencies": {
"@shikijs/vitepress-twoslash": "^1.6.1",
"dayjs": "^1.11.10",
"fast-glob": "^3.3.2",
"feed": "^4.2.2",
Expand All @@ -14,8 +15,8 @@
"gray-matter": "^4.0.3",
"markdown-it": "^14.1.0",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "1.1.3",
"vitepress-plugin-twoslash": "^0.10.2"
"shiki": "^1.6.1",
"vitepress": "1.2.2"
},
"scripts": {
"dev": "vitepress dev ",
Expand Down
Loading

0 comments on commit 16a9a61

Please sign in to comment.