UNPKG

vuepress-theme-aurora

Version:

A vuepress-based animation blog theme, simple, beautiful, multi-color, multiple custom functions, providing article poster sharing, talk, photo album, comment and other features 一个基于vuepress的动漫类博客主题,简洁,漂亮,多色彩,多种自定义功能,提供文章海报分享,说说,相册,评论等特色功�?

12 lines (11 loc) 610 B
import { computed, provide } from 'vue'; import { defineClientAppSetup, usePageFrontmatter } from '@vuepress/client'; import {resolveSidebarItems, sidebarItemsSymbol, useThemeData, useThemeLocaleData,} from './composables'; export default defineClientAppSetup(() => { // we need to access sidebar items in multiple components // so we make it global computed const themeLocale = useThemeLocaleData(); const frontmatter = usePageFrontmatter(); const sidebarItems = computed(() => resolveSidebarItems(frontmatter.value, themeLocale.value)); provide(sidebarItemsSymbol, sidebarItems); });