From 36e4f30ee4d8342d313e279cad160d66c8297e1b Mon Sep 17 00:00:00 2001 From: camera-2018 <2907618001@qq.com> Date: Sat, 19 Aug 2023 11:49:08 +0800 Subject: [PATCH] feat: clean urls --- .vitepress/config.js | 1 + .vitepress/theme/index.js | 2 +- 1.杭电生存指南/1.2竞赛指北.md | 2 +- vercel.json | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 vercel.json diff --git a/.vitepress/config.js b/.vitepress/config.js index 76d5453..6f7fb0a 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -104,6 +104,7 @@ export default withMermaid({ title: "HDU-CS-WIKI", description: "HDU 计算机科学讲义", lastUpdated: true, + cleanUrls: true, head: [['script', { async: "async", src: 'https://umami.hdu-cs.wiki/script.js', "data-website-id": "3f11687a-faae-463a-b863-6127a8c28301", "data-domains": "wiki.xyxsw.site,hdu-cs.wiki" }]], themeConfig: { // https://vitepress.dev/reference/default-theme-config diff --git a/.vitepress/theme/index.js b/.vitepress/theme/index.js index 84ed185..72062c9 100644 --- a/.vitepress/theme/index.js +++ b/.vitepress/theme/index.js @@ -26,7 +26,7 @@ export default { watch( () => ctx.router.route.data.relativePath, - () => updateHomePageStyle(location.pathname === '/' || location.pathname === '/contributors.html'), + () => updateHomePageStyle(location.pathname === '/' || location.pathname === '/contributors'), { immediate: true }, ) }, diff --git a/1.杭电生存指南/1.2竞赛指北.md b/1.杭电生存指南/1.2竞赛指北.md index 53aa6ee..331f5d4 100644 --- a/1.杭电生存指南/1.2竞赛指北.md +++ b/1.杭电生存指南/1.2竞赛指北.md @@ -81,7 +81,7 @@ CTF还有的缺点也是目前热门领域的通病:发展速度过快,后 更多可以参考计算安全章节 -[传送门](/6.%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%AE%89%E5%85%A8/6.%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%AE%89%E5%85%A8.html) +[传送门](/6.%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%AE%89%E5%85%A8/6.%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%AE%89%E5%85%A8) ## 数据科学竞赛 diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..a19e4f3 --- /dev/null +++ b/vercel.json @@ -0,0 +1,3 @@ +{ + "cleanUrls": true +} \ No newline at end of file