Skip to content

Commit aa8ae47

Browse files
authored
add base url support on api index page (vuejs#2401)
1 parent 0976439 commit aa8ae47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/ApiIndex.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// can also import types for type consistency
55
import { data as apiIndex, APIGroup } from './api.data'
66
import { ref, computed, onMounted } from 'vue'
7+
import { withBase } from 'vitepress'
78
89
const search = ref()
910
const query = ref('')
@@ -84,7 +85,7 @@ const filtered = computed(() => {
8485
<h3>{{ item.text }}</h3>
8586
<ul>
8687
<li v-for="h of item.headers" :key="h.anchor">
87-
<a :href="item.link + '.html#' + h.anchor">{{ h.text }}</a>
88+
<a :href="withBase(item.link) + '.html#' + h.anchor">{{ h.text }}</a>
8889
</li>
8990
</ul>
9091
</div>

0 commit comments

Comments
 (0)