Skip to content

Commit b15b2b7

Browse files
committed
build: bump vitepress, remove href hack
1 parent 05dec93 commit b15b2b7

File tree

4 files changed

+170
-995
lines changed

4 files changed

+170
-995
lines changed

.vitepress/theme/index.js

-9
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,5 @@ export default {
3333
)
3434
])
3535
})
36-
},
37-
enhanceApp({ app, router, siteData }) {
38-
// app is the Vue 3 app instance from `createApp()`. router is VitePress'
39-
// custom router. `siteData`` is a `ref`` of current site-level metadata.
40-
app.directive('href', {
41-
mounted(el, binding) {
42-
el.href = binding.value;
43-
}
44-
})
4536
}
4637
}

guide/assets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import InlineWorker from './shader.js?worker&inline'
8585

8686
## new URL(url, import.meta.url)
8787

88-
<a v-href="'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import'+'.meta'">import.meta.url</a> 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [URL 构造器](https://developer.mozilla.org/en-US/docs/Web/API/URL) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
88+
[import.meta.url](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import%2Emeta) 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [URL 构造器](https://developer.mozilla.org/en-US/docs/Web/API/URL) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
8989

9090
```js
9191
const imgUrl = new URL('./img.png', import.meta.url)

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"private": true,
99
"devDependencies": {
1010
"chalk": "^4.1.0",
11-
"patch-vue-directive-ssr": "^0.0.1",
12-
"vitepress": "^0.12.2",
11+
"gray-matter": "^4.0.3",
12+
"lodash": "^4.17.21",
13+
"vitepress": "^0.19.1",
1314
"yorkie": "^2.0.0"
1415
},
1516
"scripts": {

0 commit comments

Comments
 (0)