mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-11-13 23:27:17 +00:00
21 lines
463 B
Vue
21 lines
463 B
Vue
<script setup>
|
|
import { useSidebar } from 'vitepress/theme'
|
|
import { useData } from 'vitepress'
|
|
|
|
const { sidebar } = useSidebar()
|
|
const folderSidebar = sidebar.value.find(
|
|
(group) => group.text === useData().page.value.title,
|
|
)
|
|
|
|
function getHref(link) {
|
|
return `${link}.html`
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<ul v-if="folderSidebar">
|
|
<li v-for="item of folderSidebar.items">
|
|
<a :href="getHref(item.link)">{{ item.text }}</a>
|
|
</li>
|
|
</ul>
|
|
</template>
|