Skip to content

Commit 99e2cd0

Browse files
committed
Fix link
1 parent cee7b3c commit 99e2cd0

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

.vitepress/config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default defineConfig({
4040
// 开启黑暗主题按钮
4141
appearance: true,
4242
// URL清除.html后缀
43-
// cleanUrls: true,
43+
cleanUrls: false,
4444
// markdown 配置
4545
markdown: {
4646
// 代码块显示行数
@@ -54,6 +54,15 @@ export default defineConfig({
5454
config: (md) => {
5555
md.use(mathjax3);
5656
md.use(taskLists);
57+
const orig = md.renderer.rules.link_open!;
58+
md.renderer.rules.link_open = function (tokens, idx, ...args) {
59+
const token = tokens[idx];
60+
const href = token.attrGet('href')!;
61+
if (!/:\/\//.test(href) && !/(?:\.html|\/)$/.test(href)) {
62+
token.attrSet('href', href.replace(/(?:\.md)?$/, '.html'));
63+
}
64+
return orig(tokens, idx, ...args);
65+
};
5766
}
5867
},
5968
vue: {

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@
1111
},
1212
"dependencies": {
1313
"@element-plus/icons-vue": "^2.3.1",
14-
"@vueuse/core": "^12.2.0",
14+
"@vueuse/core": "^12.7.0",
1515
"artalk": "^2.9.1",
1616
"dayjs": "^1.11.13",
17-
"element-plus": "^2.9.1",
17+
"element-plus": "^2.9.5",
1818
"floating-vue": "^5.2.2",
1919
"lodash-es": "^4.17.21",
2020
"markdown-it-mathjax3": "^4.3.2",
2121
"markdown-it-task-lists": "^2.1.1",
2222
"mitt": "^3.0.1",
23-
"overlayscrollbars": "^2.10.1",
23+
"overlayscrollbars": "^2.11.1",
2424
"overlayscrollbars-vue": "^0.5.9",
25-
"pinia": "^2.3.0",
25+
"pinia": "^2.3.1",
2626
"pinia-plugin-persistedstate": "3.2.3",
27-
"unocss": "^65.4.0",
28-
"uuid": "^11.0.3",
27+
"unocss": "^65.5.0",
28+
"uuid": "^11.1.0",
2929
"viewerjs": "^1.11.7",
30-
"vitepress": "^1.5.0",
30+
"vitepress": "^1.6.3",
3131
"vitepress-plugin-image-viewer": "^1.1.6",
3232
"vue": "^3.5.13"
3333
},
3434
"devDependencies": {
35-
"@eslint/js": "^9.17.0",
35+
"@eslint/js": "^9.21.0",
3636
"@types/lodash-es": "^4.17.12",
37-
"@types/node": "^22.10.2",
38-
"@typescript-eslint/eslint-plugin": "^8.18.2",
39-
"@typescript-eslint/parser": "^8.18.2",
37+
"@types/node": "^22.13.5",
38+
"@typescript-eslint/eslint-plugin": "^8.25.0",
39+
"@typescript-eslint/parser": "^8.25.0",
4040
"@unocss/preset-rem-to-px": "^0.55.7",
4141
"@vitejs/plugin-vue": "^5.2.1",
42-
"eslint": "^9.17.0",
42+
"eslint": "^9.21.0",
4343
"eslint-plugin-vue": "^9.32.0",
4444
"sass": "1.62.1",
45-
"typescript-eslint": "^8.18.2",
46-
"vite": "^4.5.5"
45+
"typescript-eslint": "^8.25.0",
46+
"vite": "^4.5.9"
4747
}
4848
}

src/new-tools/docker_install_artalk.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ lastUpdated: 2025/1/15 23:24
1414

1515
## 第一步:拉取镜像
1616

17-
docker 安装教程这里不用多说了吧?如果不会,可以参考[这里](../learn/deploy/docker/centos_install_docker){target=_blank}。
17+
docker 安装教程这里不用多说了吧?如果不会,可以参考
18+
[这里](../learn/deploy/docker/centos_install_docker){target=_blank}。
1819

1920
```bash
2021
docker pull artalk/artalk-go
2122
docker pull nginx
2223
```
2324

2425
如果超时,可以先配置一下国内镜像,这里有教程
25-
[点击查看](../learn/deploy/docker/docker_configure_domestic_image){target=_blank}
26+
[点击查看](../learn/deploy/docker/docker_configure_domestic_image)
2627

2728
## 第二步:docker 创建共同网络
2829

0 commit comments

Comments
 (0)