提交 577d20a3 编写于 作者: D DCloud_LXH

fix: 修复 .md 链接访问

上级 abdc404c
......@@ -68,9 +68,9 @@ const config = {
.end()
.plugin('convert-header')
.use(headerPlugin)
},
extendMarkdown: md => {
md.use(require('./markdown/normallizeLink'))
.end()
.plugin('normallize-link')
.use(require('./markdown/normallizeLink'))
}
}
}
......
......@@ -18,7 +18,7 @@ function normalizeLink(url) {
module.exports = function (md) {
md.normalizeLink = (function (oldNormalizeLink) {
return function (url) {
url = isExternal(url) ? url : normalizeLink(url)
url = isExternal(url) ? url : normalizeLink(url).replace('.md', '')
return oldNormalizeLink.bind(this)(url)
}
})(md.normalizeLink)
......
......@@ -8,7 +8,7 @@
},
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs"
"build": "vuepress build docs --no-cache"
},
"repository": {
"type": "git",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册