Skip to content

Commit

Permalink
Merge pull request #117 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
GuoXiCheng authored Nov 13, 2023
2 parents 8ba3192 + f9997dc commit 69f2752
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
import { getDirname, path } from "@vuepress/utils";

const __dirname = getDirname(import.meta.url);

export default hopeTheme({
hostname: "https://guoxicheng.top",
Expand Down Expand Up @@ -66,7 +69,14 @@ export default hopeTheme({
gfm: true,
imgLazyload: true,
imgSize: true,
include: true,
include: {
resolvePath: (filePath: string, cwd: string | null) => {
if (filePath.startsWith("@src"))
return filePath.replace("@src", path.resolve(__dirname, ".."));

return filePath;
},
},
katex: true,
mark: true,
mermaid: true,
Expand Down
4 changes: 4 additions & 0 deletions src/code/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export class User {
private name: string;
private age: number;
}
4 changes: 4 additions & 0 deletions src/design-pattern/behavioral/command.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 命令模式

```ts

<!-- @include: @src/code/test.ts -->
```

::: playground#ts 命令模式交互演示

Expand Down

0 comments on commit 69f2752

Please sign in to comment.