用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fabioc-aloha/Alex_Skill_Mall --skill vitepress-spa-routing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | vitepress-spa-routing |
| description | VitePress intercepts all navigation clicks for SPA routing: |
| lastReviewed | 2026-04-30T00:00:00.000Z |
VitePress intercepts all navigation clicks for SPA routing:
<!-- This link will be handled by VitePress router -->
<a href="/external-app/">External App</a>
<!-- VitePress fetches /external-app/index.md instead of navigating -->
This breaks:
// In .vitepress/config.js
nav: [
{
text: 'External App',
link: '/app/',
target: '_self' // Forces full page navigation
}
]
nav: [
{
text: 'External App',
link: 'https://same-domain.com/app/' // Full URL bypasses router
}
]
For standalone HTML that should appear within VitePress layout.
| Scenario | Solution |
|---|---|
| Link to different app on same domain | target: "_self" |
| Link to truly external site | Full URL |
| Embed external content in VitePress layout | Iframe pattern |
| Link to static HTML file | target: "_self" |
<!-- Bad: VitePress intercepts -->
[Go to app](/app/)
<!-- Good: Force navigation -->
<a href="/app/" target="_self">Go to app</a>
<!-- Also good: Full URL -->
[Go to app](https://example.com/app/)
vitepress spa routing navigation