用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fabioc-aloha/Alex_Skill_Mall --skill vitepress-clean-urls命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | vitepress-clean-urls |
| description | With `cleanUrls: true`, nav links must NOT have `.html` extensions: |
| lastReviewed | 2026-04-30T00:00:00.000Z |
With cleanUrls: true, nav links must NOT have .html extensions:
// vitepress.config.js
export default {
cleanUrls: true // URLs become /guide/intro instead of /guide/intro.html
}
// Bad: will 404
nav: [
{ text: 'Guide', link: '/guide/intro.html' } // Wrong!
]
// Also bad in markdown
[Read more](/guide/intro.html) // Wrong!
When cleanUrls: true, use extensionless paths everywhere.
// Good
nav: [
{ text: 'Guide', link: '/guide/intro' }
]
sidebar: [
{ text: 'Introduction', link: '/guide/intro' }
]
<!-- In markdown files -->
[Read more](/guide/intro)
[See API](/api/methods)
| Pattern | cleanUrls: false | cleanUrls: true |
|---|---|---|
| Nav links | /guide.html | /guide |
| Sidebar links | /api/foo.html | /api/foo |
| Markdown links | [text](./page.html) | [text](./page) |
| External links | Unchanged | Unchanged |
// scripts/remove-html-extensions.cjs
const glob = require('glob');
const fs = require('fs');
glob.sync('docs/**/*.md').forEach(file => {
let content = fs.readFileSync(file, 'utf8');
// Replace .html) with ) and .html] with ]
content = content.replace(/\.html\)/g, ')');
content = content.replace(/\.html\]/g, ']');
fs.writeFileSync(file, content);
});
# Find remaining .html links
grep -rn '\.html[)\]]' docs/
# Should return nothing
cleanUrls: true in existing projectvitepress urls configuration links