Skip to content
0

让链接后不默认添加html

让链接后不默认添加.html

环境

Teek@1.5.0-2025.9.23 版本上测试

自己的开源库《vitepress-theme-teek-one》 --(克隆自 作者Teeker的文档风开源库《vitepress-theme-teek-docs-template》)

2025年9月26日测试

问题

默认的链接后会有一个.html,如何去掉这个呢?

image-20250926211600509

配置

编辑docs\.vitepress\config.ts文件:

ts
cleanUrls: true,  //设置为true就是让链接后不默认添加.html

image-20250926211820307

效果:

image-20250926211736791

最近更新