mirror of https://github.com/vuejs/vitepress
parent
776d8014a2
commit
15e18df01e
@ -0,0 +1,14 @@
|
||||
import { useSiteData } from 'vitepress'
|
||||
import { joinPath } from '/@app/utils'
|
||||
|
||||
export function useUrl() {
|
||||
const site = useSiteData()
|
||||
|
||||
function withBase(path: string): string {
|
||||
return joinPath(site.value.base, path)
|
||||
}
|
||||
|
||||
return {
|
||||
withBase
|
||||
}
|
||||
}
|
Loading…
Reference in new issue