perf: optimize package import
This commit is contained in:
parent
9f341b131e
commit
936b0b4851
@ -1,12 +0,0 @@
|
|||||||
import { defineClientConfig } from 'vuepress/client'
|
|
||||||
import type { ClientConfig } from 'vuepress/client'
|
|
||||||
import { Content } from './components/Content.js'
|
|
||||||
|
|
||||||
export default defineClientConfig({
|
|
||||||
enhance({ app }) {
|
|
||||||
if (app._context.components.Content)
|
|
||||||
delete app._context.components.Content
|
|
||||||
|
|
||||||
app.component('Content', Content)
|
|
||||||
},
|
|
||||||
}) as ClientConfig
|
|
||||||
@ -6,6 +6,6 @@ const __dirname = getDirname(import.meta.url)
|
|||||||
export function contentUpdatePlugin(): Plugin {
|
export function contentUpdatePlugin(): Plugin {
|
||||||
return {
|
return {
|
||||||
name: '@vuepress-plume/plugin-content-update',
|
name: '@vuepress-plume/plugin-content-update',
|
||||||
clientConfigFile: path.resolve(__dirname, '../client/clientConfig.js'),
|
clientConfigFile: path.resolve(__dirname, '../client/config.js'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { ClientOnly } from 'vuepress/client'
|
|||||||
import type { IconifyRenderMode } from '@iconify/vue'
|
import type { IconifyRenderMode } from '@iconify/vue'
|
||||||
import type { StyleValue } from 'vue'
|
import type { StyleValue } from 'vue'
|
||||||
import { computed, toRefs } from 'vue'
|
import { computed, toRefs } from 'vue'
|
||||||
import { useIconify } from '../composables/iconify.js'
|
import { useIconify } from '../composables/index.js'
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@ -31,13 +31,13 @@ const { name } = toRefs(props)
|
|||||||
const { icon, loaded } = useIconify(name)
|
const { icon, loaded } = useIconify(name)
|
||||||
|
|
||||||
const size = computed(() => {
|
const size = computed(() => {
|
||||||
const size = props.size || __VUEPRESS_PLUGIN_ICONIFY_DEFAULT_SIZE__
|
const size = props.size || __VP_ICONIFY_SIZE__
|
||||||
if (String(Number(size)) === size)
|
if (String(Number(size)) === size)
|
||||||
return `${size}px`
|
return `${size}px`
|
||||||
|
|
||||||
return size
|
return size
|
||||||
})
|
})
|
||||||
const color = computed(() => props.color || __VUEPRESS_PLUGIN_ICONIFY_DEFAULT_COLOR__)
|
const color = computed(() => props.color || __VP_ICONIFY_COLOR__)
|
||||||
|
|
||||||
const bind = computed<any>(() => ({
|
const bind = computed<any>(() => ({
|
||||||
icon: icon.value,
|
icon: icon.value,
|
||||||
@ -55,8 +55,8 @@ const bind = computed<any>(() => ({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
declare const __VUEPRESS_PLUGIN_ICONIFY_DEFAULT_SIZE__: string
|
declare const __VP_ICONIFY_SIZE__: string
|
||||||
declare const __VUEPRESS_PLUGIN_ICONIFY_DEFAULT_COLOR__: string
|
declare const __VP_ICONIFY_COLOR__: string
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
1
plugins/plugin-iconify/src/client/composables/index.ts
Normal file
1
plugins/plugin-iconify/src/client/composables/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './iconify.js'
|
||||||
@ -2,10 +2,10 @@ import { defineClientConfig } from 'vuepress/client'
|
|||||||
import type { ClientConfig } from 'vuepress/client'
|
import type { ClientConfig } from 'vuepress/client'
|
||||||
import Iconify from './components/Iconify.vue'
|
import Iconify from './components/Iconify.vue'
|
||||||
|
|
||||||
declare const __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__: string
|
declare const __VP_ICONIFY_NAME__: string
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
enhance({ app }) {
|
enhance({ app }) {
|
||||||
const name = __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__ || 'Iconify'
|
const name = __VP_ICONIFY_NAME__ || 'Iconify'
|
||||||
app.component(name, Iconify)
|
app.component(name, Iconify)
|
||||||
},
|
},
|
||||||
}) as ClientConfig
|
}) as ClientConfig
|
||||||
@ -1,2 +0,0 @@
|
|||||||
export * from './composables/iconify.js'
|
|
||||||
export * from '../shared/index.js'
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { iconifyPlugin } from './plugin.js'
|
import { iconifyPlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin.js'
|
export * from './plugin.js'
|
||||||
export * from '../shared/index.js'
|
|
||||||
|
|
||||||
|
/** @deprecated 请使用 具名导出 替代 默认导出 */
|
||||||
export default iconifyPlugin
|
export default iconifyPlugin
|
||||||
|
|||||||
@ -1,24 +1,24 @@
|
|||||||
import type { Plugin } from 'vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from 'vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import type { IconifyOptions } from '../shared/index.js'
|
|
||||||
|
export interface IconifyPluginOptions {
|
||||||
|
componentName?: string
|
||||||
|
color?: string
|
||||||
|
size?: string | number
|
||||||
|
}
|
||||||
|
|
||||||
export function iconifyPlugin({
|
export function iconifyPlugin({
|
||||||
componentName = 'Iconify',
|
componentName = 'Iconify',
|
||||||
size = '1em',
|
size = '1em',
|
||||||
color = 'currentColor',
|
color = 'currentColor',
|
||||||
}: IconifyOptions = {}): Plugin {
|
}: IconifyPluginOptions = {}): Plugin {
|
||||||
return () => {
|
return {
|
||||||
return {
|
name: '@vuepress-plume/plugin-iconify',
|
||||||
name: '@vuepress-plume/plugin-iconify',
|
define: {
|
||||||
define: {
|
__VP_ICONIFY_NAME__: componentName,
|
||||||
__VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__: componentName,
|
__VP_ICONIFY_SIZE__: size,
|
||||||
__VUEPRESS_PLUGIN_ICONIFY_DEFAULT_SIZE__: size,
|
__VP_ICONIFY_COLOR__: color,
|
||||||
__VUEPRESS_PLUGIN_ICONIFY_DEFAULT_COLOR__: color,
|
},
|
||||||
},
|
clientConfigFile: path.resolve(getDirname(import.meta.url), '../client/config.js'),
|
||||||
clientConfigFile: path.resolve(
|
|
||||||
getDirname(import.meta.url),
|
|
||||||
'../client/clientConfig.js',
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
export interface IconifyOptions {
|
|
||||||
componentName?: string
|
|
||||||
color?: string
|
|
||||||
size?: string | number
|
|
||||||
}
|
|
||||||
@ -51,18 +51,11 @@ export async function prepareConfigFile(app: App, options: MarkdownPowerPluginOp
|
|||||||
enhances.add(`app.component('CodeRepl', CodeRepl)`)
|
enhances.add(`app.component('CodeRepl', CodeRepl)`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// enhances.add(`if (__VUEPRESS_SSR__) return`)
|
|
||||||
|
|
||||||
if (options.caniuse) {
|
if (options.caniuse) {
|
||||||
imports.add(`import CanIUse from '${CLIENT_FOLDER}components/CanIUse.vue'`)
|
imports.add(`import CanIUse from '${CLIENT_FOLDER}components/CanIUse.vue'`)
|
||||||
enhances.add(`app.component('CanIUseViewer', CanIUse)`)
|
enhances.add(`app.component('CanIUseViewer', CanIUse)`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (options.caniuse) {
|
|
||||||
// imports.add(`import { setupCanIUse } from '${CLIENT_FOLDER}composables/setupCanIUse.js'`)
|
|
||||||
// enhances.add(`router.afterEach(() => setupCanIUse())`)
|
|
||||||
// }
|
|
||||||
|
|
||||||
return app.writeTemp(
|
return app.writeTemp(
|
||||||
'md-power/config.js',
|
'md-power/config.js',
|
||||||
`\
|
`\
|
||||||
|
|||||||
@ -23,10 +23,9 @@ import {
|
|||||||
import Mark from 'mark.js/src/vanilla.js'
|
import Mark from 'mark.js/src/vanilla.js'
|
||||||
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
|
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
|
||||||
import MiniSearch, { type SearchResult } from 'minisearch'
|
import MiniSearch, { type SearchResult } from 'minisearch'
|
||||||
import { useSearchIndex } from '../composables/index.js'
|
import { useLocale, useSearchIndex } from '../composables/index.js'
|
||||||
import type { SearchBoxLocales, SearchOptions } from '../../shared/index.js'
|
import type { SearchBoxLocales, SearchOptions } from '../../shared/index.js'
|
||||||
import { LRUCache } from '../utils/lru.js'
|
import { LRUCache } from '../utils/index.js'
|
||||||
import { useLocale } from '../composables/locale.js'
|
|
||||||
import SearchIcon from './icons/SearchIcon.vue'
|
import SearchIcon from './icons/SearchIcon.vue'
|
||||||
import ClearIcon from './icons/ClearIcon.vue'
|
import ClearIcon from './icons/ClearIcon.vue'
|
||||||
import BackIcon from './icons/BackIcon.vue'
|
import BackIcon from './icons/BackIcon.vue'
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toRef } from 'vue'
|
import { toRef } from 'vue'
|
||||||
import type { SearchBoxLocales } from '../../shared/index.js'
|
import type { SearchBoxLocales } from '../../shared/index.js'
|
||||||
import { useLocale } from '../composables/locale.js'
|
import { useLocale } from '../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
locales: SearchBoxLocales
|
locales: SearchBoxLocales
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
export * from './searchIndex.js'
|
export * from './searchIndex.js'
|
||||||
|
export * from './locale.js'
|
||||||
|
|||||||
1
plugins/plugin-search/src/client/utils/index.ts
Normal file
1
plugins/plugin-search/src/client/utils/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './lru.js'
|
||||||
@ -7,7 +7,7 @@ import VPBlogTags from '@theme/Blog/VPBlogTags.vue'
|
|||||||
import VPBlogCategories from '@theme/Blog/VPBlogCategories.vue'
|
import VPBlogCategories from '@theme/Blog/VPBlogCategories.vue'
|
||||||
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
||||||
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme, page } = useData()
|
const { theme, page } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
||||||
import { useBlogNavTitle } from '../../composables/blog-extract.js'
|
import { useArchives, useBlogNavTitle } from '../../composables/index.js'
|
||||||
import { useArchives } from '../../composables/blog-archives.js'
|
|
||||||
|
|
||||||
const title = useBlogNavTitle('archive')
|
const title = useBlogNavTitle('archive')
|
||||||
const { archives } = useArchives()
|
const { archives } = useArchives()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
||||||
import VPBlogProfile from '@theme/Blog/VPBlogProfile.vue'
|
import VPBlogProfile from '@theme/Blog/VPBlogProfile.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import VPCategories from '@theme/Blog/VPCategories.vue'
|
import VPCategories from '@theme/Blog/VPCategories.vue'
|
||||||
import { useBlogCategory } from '../../composables/blog-category.js'
|
import { useBlogCategory, useBlogNavTitle } from '../../composables/index.js'
|
||||||
import { useBlogNavTitle } from '../../composables/blog-extract.js'
|
|
||||||
|
|
||||||
const title = useBlogNavTitle('category')
|
const title = useBlogNavTitle('category')
|
||||||
const { categories } = useBlogCategory()
|
const { categories } = useBlogCategory()
|
||||||
|
|||||||
@ -4,8 +4,7 @@ import { computed, ref, watch } from 'vue'
|
|||||||
import { useRoute, withBase } from 'vuepress/client'
|
import { useRoute, withBase } from 'vuepress/client'
|
||||||
import { isLinkHttp } from 'vuepress/shared'
|
import { isLinkHttp } from 'vuepress/shared'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import { useBlogExtract } from '../../composables/blog-extract.js'
|
import { useBlogExtract, useData } from '../../composables/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
|
||||||
import { inBrowser } from '../../utils/index.js'
|
import { inBrowser } from '../../utils/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useRoute } from 'vuepress/client'
|
import { useRoute } from 'vuepress/client'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import { useBlogExtract } from '../../composables/blog-extract.js'
|
import { useBlogExtract } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
isLocal?: boolean
|
isLocal?: boolean
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { computed } from 'vue'
|
|||||||
import { withBase } from 'vuepress/client'
|
import { withBase } from 'vuepress/client'
|
||||||
import { isLinkHttp } from 'vuepress/shared'
|
import { isLinkHttp } from 'vuepress/shared'
|
||||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
const profile = computed(() => theme.value.profile)
|
const profile = computed(() => theme.value.profile)
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
||||||
import { useBlogNavTitle } from '../../composables/blog-extract.js'
|
import { useBlogNavTitle, useTags } from '../../composables/index.js'
|
||||||
import { useTags } from '../../composables/blog-tags.js'
|
|
||||||
|
|
||||||
const { tags, currentTag, postList, handleTagClick } = useTags()
|
const { tags, currentTag, postList, handleTagClick } = useTags()
|
||||||
const title = useBlogNavTitle('tag')
|
const title = useBlogNavTitle('tag')
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPCategoriesGroup from '@theme/Blog/VPCategoriesGroup.vue'
|
import VPCategoriesGroup from '@theme/Blog/VPCategoriesGroup.vue'
|
||||||
import type { BlogCategoryItem, BlogCategoryItemWithPost } from '../../composables/blog-category.js'
|
import type { BlogCategoryItem, BlogCategoryItemWithPost } from '../../composables/index.js'
|
||||||
|
|
||||||
defineProps < {
|
defineProps < {
|
||||||
items: (BlogCategoryItem | BlogCategoryItemWithPost)[]
|
items: (BlogCategoryItem | BlogCategoryItemWithPost)[]
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { useRoute } from 'vuepress/client'
|
import { useRoute } from 'vuepress/client'
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import VPCategories from '@theme/Blog/VPCategories.vue'
|
import VPCategories from '@theme/Blog/VPCategories.vue'
|
||||||
import type { BlogCategoryItem } from '../../composables/blog-category.js'
|
import type { BlogCategoryItem } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
item: BlogCategoryItem
|
item: BlogCategoryItem
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
page: number
|
page: number
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import type { PlumeThemeBlogPostItem } from '../../../shared/index.js'
|
import type { PlumeThemeBlogPostItem } from '../../../shared/index.js'
|
||||||
import { useTagColors } from '../../composables/tag-colors.js'
|
import { useTagColors } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
post: PlumeThemeBlogPostItem
|
post: PlumeThemeBlogPostItem
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import VPTransitionDrop from '@theme/VPTransitionDrop.vue'
|
import VPTransitionDrop from '@theme/VPTransitionDrop.vue'
|
||||||
import VPPostItem from '@theme/Blog/VPPostItem.vue'
|
import VPPostItem from '@theme/Blog/VPPostItem.vue'
|
||||||
import VPPagination from '@theme/Blog/VPPagination.vue'
|
import VPPagination from '@theme/Blog/VPPagination.vue'
|
||||||
import { usePostListControl } from '../../composables/blog-post-list.js'
|
import { usePostListControl } from '../../composables/index.js'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
postList,
|
postList,
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import VPHomeFeatures from '@theme/Home/VPHomeFeatures.vue'
|
|||||||
import VPHomeTextImage from '@theme/Home/VPHomeTextImage.vue'
|
import VPHomeTextImage from '@theme/Home/VPHomeTextImage.vue'
|
||||||
import VPHomeProfile from '@theme/Home/VPHomeProfile.vue'
|
import VPHomeProfile from '@theme/Home/VPHomeProfile.vue'
|
||||||
import VPHomeCustom from '@theme/Home/VPHomeCustom.vue'
|
import VPHomeCustom from '@theme/Home/VPHomeCustom.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const components: Record<string, Component<any, any, any>> = {
|
const components: Record<string, Component<any, any, any>> = {
|
||||||
'banner': VPHomeBanner,
|
'banner': VPHomeBanner,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { isLinkHttp } from 'vuepress/shared'
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPButton from '@theme/VPButton.vue'
|
import VPButton from '@theme/VPButton.vue'
|
||||||
import type { PlumeThemeHomeBanner } from '../../../shared/index.js'
|
import type { PlumeThemeHomeBanner } from '../../../shared/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<PlumeThemeHomeBanner>()
|
const props = defineProps<PlumeThemeHomeBanner>()
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { withBase } from 'vuepress/client'
|
|||||||
import { computed, normalizeClass } from 'vue'
|
import { computed, normalizeClass } from 'vue'
|
||||||
import { isLinkHttp } from 'vuepress/shared'
|
import { isLinkHttp } from 'vuepress/shared'
|
||||||
import type { PlumeHomeConfigBase } from '../../../shared/index.js'
|
import type { PlumeHomeConfigBase } from '../../../shared/index.js'
|
||||||
import { useDarkMode } from '../../composables/dark-mode.js'
|
import { useDarkMode } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<PlumeHomeConfigBase & {
|
const props = defineProps<PlumeHomeConfigBase & {
|
||||||
containerClass?: any
|
containerClass?: any
|
||||||
|
|||||||
@ -3,8 +3,7 @@ import { withBase } from 'vuepress/client'
|
|||||||
import { isLinkHttp } from 'vuepress/shared'
|
import { isLinkHttp } from 'vuepress/shared'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import VPButton from '@theme/VPButton.vue'
|
import VPButton from '@theme/VPButton.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData, useHomeHeroTintPlate } from '../../composables/index.js'
|
||||||
import { useHomeHeroTintPlate } from '../../composables/home.js'
|
|
||||||
import type { PlumeThemeHomeHero } from '../../../shared/index.js'
|
import type { PlumeThemeHomeHero } from '../../../shared/index.js'
|
||||||
|
|
||||||
const props = defineProps<PlumeThemeHomeHero>()
|
const props = defineProps<PlumeThemeHomeHero>()
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { computed } from 'vue'
|
|||||||
import VPImage from '@theme/VPImage.vue'
|
import VPImage from '@theme/VPImage.vue'
|
||||||
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
||||||
import type { PlumeThemeHomeProfile } from '../../../shared/index.js'
|
import type { PlumeThemeHomeProfile } from '../../../shared/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<PlumeThemeHomeProfile>()
|
const props = defineProps<PlumeThemeHomeProfile>()
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
import { computed, provide, watchEffect } from 'vue'
|
import { computed, provide, watchEffect } from 'vue'
|
||||||
import VPNavbar from '@theme/Nav/VPNavBar.vue'
|
import VPNavbar from '@theme/Nav/VPNavBar.vue'
|
||||||
import VPNavScreen from '@theme/Nav/VPNavScreen.vue'
|
import VPNavScreen from '@theme/Nav/VPNavScreen.vue'
|
||||||
import { useNav } from '../../composables/nav.js'
|
import { useData, useNav } from '../../composables/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
|
||||||
import { inBrowser } from '../../utils/index.js'
|
import { inBrowser } from '../../utils/index.js'
|
||||||
|
|
||||||
const { page, frontmatter } = useData()
|
const { page, frontmatter } = useData()
|
||||||
|
|||||||
@ -9,8 +9,7 @@ import VPNavBarSearch from '@theme/Nav/VPNavBarSearch.vue'
|
|||||||
import VPNavBarSocialLinks from '@theme/Nav/VPNavBarSocialLinks.vue'
|
import VPNavBarSocialLinks from '@theme/Nav/VPNavBarSocialLinks.vue'
|
||||||
import VPNavBarTitle from '@theme/Nav/VPNavBarTitle.vue'
|
import VPNavBarTitle from '@theme/Nav/VPNavBarTitle.vue'
|
||||||
import VPNavBarTranslations from '@theme/Nav/VPNavBarTranslations.vue'
|
import VPNavBarTranslations from '@theme/Nav/VPNavBarTranslations.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData, useSidebar } from '../../composables/index.js'
|
||||||
import { useSidebar } from '../../composables/sidebar.js'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
isScreenOpen: boolean
|
isScreenOpen: boolean
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -4,8 +4,7 @@ import VPFlyout from '@theme/VPFlyout.vue'
|
|||||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||||
import { useLangs } from '../../composables/langs.js'
|
import { useData, useLangs } from '../../composables/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
const { localeLinks, currentLang } = useLangs()
|
const { localeLinks, currentLang } = useLangs()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPNavBarMenuGroup from '@theme/Nav/VPNavBarMenuGroup.vue'
|
import VPNavBarMenuGroup from '@theme/Nav/VPNavBarMenuGroup.vue'
|
||||||
import VPNavBarMenuLink from '@theme/Nav/VPNavBarMenuLink.vue'
|
import VPNavBarMenuLink from '@theme/Nav/VPNavBarMenuLink.vue'
|
||||||
import { useNavbarData } from '../../composables/nav.js'
|
import { useNavbarData } from '../../composables/index.js'
|
||||||
|
|
||||||
const navbar = useNavbarData()
|
const navbar = useNavbarData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -5,9 +5,9 @@ import VPFlyout from '@theme/VPFlyout.vue'
|
|||||||
import type {
|
import type {
|
||||||
ResolvedNavItem,
|
ResolvedNavItem,
|
||||||
ResolvedNavItemWithChildren,
|
ResolvedNavItemWithChildren,
|
||||||
} from '../../../shared/resolved/navbar.js'
|
} from '../../../shared/index.js'
|
||||||
import { isActive } from '../../utils/index.js'
|
import { isActive } from '../../utils/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
item: ResolvedNavItemWithChildren
|
item: ResolvedNavItemWithChildren
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
import { resolveRouteFullPath } from 'vuepress/client'
|
import { resolveRouteFullPath } from 'vuepress/client'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import type { ResolvedNavItemWithLink } from '../../../shared/resolved/navbar.js'
|
import type { ResolvedNavItemWithLink } from '../../../shared/index.js'
|
||||||
import { isActive } from '../../utils/index.js'
|
import { isActive } from '../../utils/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
item: ResolvedNavItemWithLink
|
item: ResolvedNavItemWithLink
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
import { useRouteLocale } from 'vuepress/client'
|
import { useRouteLocale } from 'vuepress/client'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPImage from '@theme/VPImage.vue'
|
import VPImage from '@theme/VPImage.vue'
|
||||||
import { useSidebar } from '../../composables/sidebar.js'
|
import { useData, useSidebar } from '../../composables/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
|
||||||
|
|
||||||
const { theme, site } = useData()
|
const { theme, site } = useData()
|
||||||
const { hasSidebar } = useSidebar()
|
const { hasSidebar } = useSidebar()
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPFlyout from '@theme/VPFlyout.vue'
|
import VPFlyout from '@theme/VPFlyout.vue'
|
||||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||||
import { useLangs } from '../../composables/langs.js'
|
import { useData, useLangs } from '../../composables/index.js'
|
||||||
import { useData } from '../../composables/data.js'
|
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
const { currentLang, localeLinks } = useLangs()
|
const { currentLang, localeLinks } = useLangs()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPNavScreenMenuGroup from '@theme/Nav/VPNavScreenMenuGroup.vue'
|
import VPNavScreenMenuGroup from '@theme/Nav/VPNavScreenMenuGroup.vue'
|
||||||
import VPNavScreenMenuLink from '@theme/Nav/VPNavScreenMenuLink.vue'
|
import VPNavScreenMenuLink from '@theme/Nav/VPNavScreenMenuLink.vue'
|
||||||
import { useNavbarData } from '../../composables/nav.js'
|
import { useNavbarData } from '../../composables/index.js'
|
||||||
|
|
||||||
const navbar = useNavbarData()
|
const navbar = useNavbarData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import type { ResolvedNavItemWithLink } from '../../../shared/resolved/navbar.js'
|
import type { ResolvedNavItemWithLink } from '../../../shared/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
item: ResolvedNavItemWithLink
|
item: ResolvedNavItemWithLink
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import type { ResolvedNavItemWithLink } from '../../../shared/resolved/navbar.js'
|
import type { ResolvedNavItemWithLink } from '../../../shared/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
item: ResolvedNavItemWithLink
|
item: ResolvedNavItemWithLink
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||||
import { useData } from '../../composables/data.js'
|
import { useData } from '../../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import { useLangs } from '../../composables/langs.js'
|
import { useLangs } from '../../composables/index.js'
|
||||||
|
|
||||||
const { localeLinks, currentLang } = useLangs()
|
const { localeLinks, currentLang } = useLangs()
|
||||||
const isOpen = ref(false)
|
const isOpen = ref(false)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useElementSize, useWindowScroll, useWindowSize } from '@vueuse/core'
|
import { useElementSize, useWindowScroll, useWindowSize } from '@vueuse/core'
|
||||||
import { computed, onMounted, ref, shallowRef, watch } from 'vue'
|
import { computed, onMounted, ref, shallowRef, watch } from 'vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const body = shallowRef<HTMLElement | null>()
|
const body = shallowRef<HTMLElement | null>()
|
||||||
const { height: bodyHeight } = useElementSize(body)
|
const { height: bodyHeight } = useElementSize(body)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, toRef } from 'vue'
|
import { computed, toRef } from 'vue'
|
||||||
import { useRouter, withBase } from 'vuepress/client'
|
import { useRouter, withBase } from 'vuepress/client'
|
||||||
import { useLink } from '../composables/link.js'
|
import { useLink } from '../composables/index.js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
tag?: string
|
tag?: string
|
||||||
|
|||||||
@ -5,9 +5,8 @@ import VPDoc from '@theme/VPDoc.vue'
|
|||||||
import VPPage from '@theme/VPPage.vue'
|
import VPPage from '@theme/VPPage.vue'
|
||||||
import VPHome from '@theme/Home/VPHome.vue'
|
import VPHome from '@theme/Home/VPHome.vue'
|
||||||
import VPFriends from '@theme/VPFriends.vue'
|
import VPFriends from '@theme/VPFriends.vue'
|
||||||
import { useData, useSidebar } from '../composables/index.js'
|
import { useBlogPageData, useData, useSidebar } from '../composables/index.js'
|
||||||
import { inBrowser } from '../utils/index.js'
|
import { inBrowser } from '../utils/index.js'
|
||||||
import { useBlogPageData } from '../composables/page.js'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
isNotFound?: boolean
|
isNotFound?: boolean
|
||||||
|
|||||||
@ -6,11 +6,13 @@ import VPDocAside from '@theme/VPDocAside.vue'
|
|||||||
import VPDocFooter from '@theme/VPDocFooter.vue'
|
import VPDocFooter from '@theme/VPDocFooter.vue'
|
||||||
import VPEncryptPage from '@theme/VPEncryptPage.vue'
|
import VPEncryptPage from '@theme/VPEncryptPage.vue'
|
||||||
import VPDocMeta from '@theme/VPDocMeta.vue'
|
import VPDocMeta from '@theme/VPDocMeta.vue'
|
||||||
import { useEncrypt } from '../composables/encrypt.js'
|
import {
|
||||||
import { useSidebar } from '../composables/sidebar.js'
|
useBlogPageData,
|
||||||
import { useData } from '../composables/data.js'
|
useData,
|
||||||
import { useHeaders } from '../composables/outline.js'
|
useEncrypt,
|
||||||
import { useBlogPageData } from '../composables/page.js'
|
useHeaders,
|
||||||
|
useSidebar,
|
||||||
|
} from '../composables/index.js'
|
||||||
|
|
||||||
const { page, theme, frontmatter, isDark } = useData()
|
const { page, theme, frontmatter, isDark } = useData()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
||||||
import { useActiveAnchor, useHeaders } from '../composables/outline.js'
|
import { useActiveAnchor, useData, useHeaders } from '../composables/index.js'
|
||||||
import { useData } from '../composables/data.js'
|
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import { useContributors } from '../composables/contributors.js'
|
import {
|
||||||
import { useEditLink } from '../composables/edit-link.js'
|
useContributors,
|
||||||
import { useLastUpdated } from '../composables/latest-updated.js'
|
useData,
|
||||||
import { usePrevNext } from '../composables/prev-next.js'
|
useEditLink,
|
||||||
import { useData } from '../composables/data.js'
|
useLastUpdated,
|
||||||
|
usePrevNext,
|
||||||
|
} from '../composables/index.js'
|
||||||
|
|
||||||
const { theme, frontmatter } = useData()
|
const { theme, frontmatter } = useData()
|
||||||
const editLink = useEditLink()
|
const editLink = useEditLink()
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useReadingTimeLocale } from '@vuepress/plugin-reading-time/client'
|
import { useReadingTimeLocale } from '@vuepress/plugin-reading-time/client'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import { useData } from '../composables/data.js'
|
import {
|
||||||
import { useTagColors } from '../composables/tag-colors.js'
|
useBlogExtract,
|
||||||
import { useBlogPageData } from '../composables/page.js'
|
useBlogPageData,
|
||||||
import { useBlogExtract } from '../composables/blog-extract.js'
|
useData,
|
||||||
|
useTagColors,
|
||||||
|
} from '../composables/index.js'
|
||||||
|
|
||||||
const { page, frontmatter: matter } = useData<'post'>()
|
const { page, frontmatter: matter } = useData<'post'>()
|
||||||
const { isBlogPost } = useBlogPageData()
|
const { isBlogPost } = useBlogPageData()
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { MenuItem } from '../composables/outline.js'
|
import type { MenuItem } from '../composables/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
headers: MenuItem[]
|
headers: MenuItem[]
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData, useEncryptCompare } from '../composables/index.js'
|
||||||
import { useEncryptCompare } from '../composables/encrypt.js'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
global?: boolean
|
global?: boolean
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPFooter from '@theme/VPFooter.vue'
|
import VPFooter from '@theme/VPFooter.vue'
|
||||||
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const { theme, site } = useData()
|
const { theme, site } = useData()
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import VPMenu from '@theme/VPMenu.vue'
|
import VPMenu from '@theme/VPMenu.vue'
|
||||||
import { useFlyout } from '../composables/flyout.js'
|
import { useFlyout } from '../composables/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
prefixIcon?: string | { svg: string }
|
prefixIcon?: string | { svg: string }
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useCssVar } from '@vueuse/core'
|
import { useCssVar } from '@vueuse/core'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData, useSidebar } from '../composables/index.js'
|
||||||
import { useSidebar } from '../composables/sidebar.js'
|
|
||||||
import { inBrowser } from '../utils/index.js'
|
import { inBrowser } from '../utils/index.js'
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
|
|||||||
@ -3,8 +3,7 @@ import { computed } from 'vue'
|
|||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPFriendsItem from '@theme/VPFriendsItem.vue'
|
import VPFriendsItem from '@theme/VPFriendsItem.vue'
|
||||||
import VPFriendsGroup from '@theme/VPFriendsGroup.vue'
|
import VPFriendsGroup from '@theme/VPFriendsGroup.vue'
|
||||||
import { useEditLink } from '../composables/edit-link.js'
|
import { useData, useEditLink } from '../composables/index.js'
|
||||||
import { useData } from '../composables/data.js'
|
|
||||||
|
|
||||||
const editLink = useEditLink()
|
const editLink = useEditLink()
|
||||||
const { frontmatter: matter } = useData<'friends'>()
|
const { frontmatter: matter } = useData<'friends'>()
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { isPlainObject } from '@vuepress/helper/client'
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import type { FriendsItem } from '../../shared/index'
|
import type { FriendsItem } from '../../shared/index'
|
||||||
import { useDarkMode } from '../composables/dark-mode.js'
|
import { useDarkMode } from '../composables/index.js'
|
||||||
import VPSocialLinks from './VPSocialLinks.vue'
|
import VPSocialLinks from './VPSocialLinks.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, toRef } from 'vue'
|
import { computed, toRef } from 'vue'
|
||||||
import { useRouter, withBase } from 'vuepress/client'
|
import { useRouter, withBase } from 'vuepress/client'
|
||||||
import { useLink } from '../composables/link.js'
|
import { useLink } from '../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
tag?: string
|
tag?: string
|
||||||
|
|||||||
@ -2,10 +2,7 @@
|
|||||||
import { useWindowScroll } from '@vueuse/core'
|
import { useWindowScroll } from '@vueuse/core'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import VPLocalNavOutlineDropdown from '@theme/VPLocalNavOutlineDropdown.vue'
|
import VPLocalNavOutlineDropdown from '@theme/VPLocalNavOutlineDropdown.vue'
|
||||||
import { useSidebar } from '../composables/sidebar.js'
|
import { useBlogPageData, useData, useHeaders, useSidebar } from '../composables/index.js'
|
||||||
import { useHeaders } from '../composables/outline.js'
|
|
||||||
import { useData } from '../composables/data.js'
|
|
||||||
import { useBlogPageData } from '../composables/page.js'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
open: boolean
|
open: boolean
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
import { onClickOutside } from '@vueuse/core'
|
import { onClickOutside } from '@vueuse/core'
|
||||||
import { nextTick, ref, watch } from 'vue'
|
import { nextTick, ref, watch } from 'vue'
|
||||||
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
||||||
import type { MenuItem } from '../composables/outline.js'
|
import type { MenuItem } from '../composables/index.js'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
headers: MenuItem[]
|
headers: MenuItem[]
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import { resolveRouteFullPath } from 'vuepress/client'
|
import { resolveRouteFullPath } from 'vuepress/client'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
import { isActive } from '../utils/index.js'
|
import { isActive } from '../utils/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { onMounted, ref, watch } from 'vue'
|
|||||||
import { useRoutePath } from 'vuepress/client'
|
import { useRoutePath } from 'vuepress/client'
|
||||||
import VPSidebarGroup from '@theme/VPSidebarGroup.vue'
|
import VPSidebarGroup from '@theme/VPSidebarGroup.vue'
|
||||||
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
||||||
import { useSidebar } from '../composables/sidebar.js'
|
import { useSidebar } from '../composables/index.js'
|
||||||
import { inBrowser } from '../utils/index.js'
|
import { inBrowser } from '../utils/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||||
import type { ResolvedSidebarItem } from '../../shared/resolved/sidebar.js'
|
import VPSidebarItem from '@theme/VPSidebarItem.vue'
|
||||||
import VPSidebarItem from './VPSidebarItem.vue'
|
import type { ResolvedSidebarItem } from '../../shared/index.js'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
items: ResolvedSidebarItem[]
|
items: ResolvedSidebarItem[]
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import VPLink from '@theme/VPLink.vue'
|
import VPLink from '@theme/VPLink.vue'
|
||||||
import VPIcon from '@theme/VPIcon.vue'
|
import VPIcon from '@theme/VPIcon.vue'
|
||||||
import { useSidebarControl } from '../composables/sidebar.js'
|
import { useSidebarControl } from '../composables/index.js'
|
||||||
import type { ResolvedSidebarItem } from '../../shared/resolved/sidebar.js'
|
import type { ResolvedSidebarItem } from '../../shared/index.js'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
item: ResolvedSidebarItem
|
item: ResolvedSidebarItem
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, ref, watchPostEffect } from 'vue'
|
import { inject, ref, watchPostEffect } from 'vue'
|
||||||
import VPSwitch from '@theme/VPSwitch.vue'
|
import VPSwitch from '@theme/VPSwitch.vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const checked = ref(false)
|
const checked = ref(false)
|
||||||
const { theme, isDark } = useData()
|
const { theme, isDark } = useData()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
delay?: number
|
delay?: number
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useScrollPromise } from '../composables/scroll-promise.js'
|
import { useData, useScrollPromise } from '../composables/index.js'
|
||||||
import { useData } from '../composables/data.js'
|
|
||||||
|
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
const { resolve: onBeforeEnter, pending: onBeforeLeave } = useScrollPromise()
|
const { resolve: onBeforeEnter, pending: onBeforeLeave } = useScrollPromise()
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
export * from './theme-data.js'
|
export * from './theme-data.js'
|
||||||
export * from './dark-mode.js'
|
export * from './dark-mode.js'
|
||||||
export * from './data.js'
|
export * from './data.js'
|
||||||
|
|
||||||
export * from './scroll-promise.js'
|
export * from './scroll-promise.js'
|
||||||
export * from './scroll-behavior.js'
|
export * from './scroll-behavior.js'
|
||||||
|
|
||||||
|
export * from './langs.js'
|
||||||
|
export * from './flyout.js'
|
||||||
|
export * from './nav.js'
|
||||||
export * from './sidebar.js'
|
export * from './sidebar.js'
|
||||||
export * from './aside.js'
|
export * from './aside.js'
|
||||||
export * from './outline.js'
|
export * from './outline.js'
|
||||||
@ -13,6 +17,8 @@ export * from './edit-link.js'
|
|||||||
export * from './latest-updated.js'
|
export * from './latest-updated.js'
|
||||||
export * from './contributors.js'
|
export * from './contributors.js'
|
||||||
|
|
||||||
|
export * from './home.js'
|
||||||
|
|
||||||
export * from './blog-data.js'
|
export * from './blog-data.js'
|
||||||
export * from './blog-post-list.js'
|
export * from './blog-post-list.js'
|
||||||
export * from './blog-extract.js'
|
export * from './blog-extract.js'
|
||||||
@ -28,4 +34,5 @@ export * from './encrypt.js'
|
|||||||
export * from './link.js'
|
export * from './link.js'
|
||||||
export * from './locale.js'
|
export * from './locale.js'
|
||||||
export * from './route-query.js'
|
export * from './route-query.js'
|
||||||
|
|
||||||
export * from './watermark.js'
|
export * from './watermark.js'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { usePageLang } from 'vuepress/client'
|
import { usePageLang } from 'vuepress/client'
|
||||||
import { computed, onMounted, ref, watchEffect } from 'vue'
|
import { computed, onMounted, ref, watchEffect } from 'vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from './data.js'
|
||||||
|
|
||||||
export function useLastUpdated() {
|
export function useLastUpdated() {
|
||||||
const { theme, page, frontmatter } = useData()
|
const { theme, page, frontmatter } = useData()
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
import { useRoute } from 'vuepress/client'
|
import { useRoute } from 'vuepress/client'
|
||||||
import type { NavItem } from '../../shared/index.js'
|
|
||||||
import type {
|
import type {
|
||||||
|
NavItem,
|
||||||
ResolvedNavItem,
|
ResolvedNavItem,
|
||||||
ResolvedNavItemWithLink,
|
ResolvedNavItemWithLink,
|
||||||
} from '../../shared/resolved/navbar.js'
|
} from '../../shared/index.js'
|
||||||
|
|
||||||
import { normalizeLink, resolveNavLink } from '../utils/index.js'
|
import { normalizeLink, resolveNavLink } from '../utils/index.js'
|
||||||
import { useData } from './data.js'
|
import { useData } from './data.js'
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,7 @@ import {
|
|||||||
} from 'vue'
|
} from 'vue'
|
||||||
import { sidebar as sidebarRaw } from '@internal/sidebar'
|
import { sidebar as sidebarRaw } from '@internal/sidebar'
|
||||||
import { isActive, normalizeLink, normalizePrefix, resolveNavLink } from '../utils/index.js'
|
import { isActive, normalizeLink, normalizePrefix, resolveNavLink } from '../utils/index.js'
|
||||||
import type { Sidebar, SidebarItem } from '../../shared/index.js'
|
import type { ResolvedSidebarItem, Sidebar, SidebarItem } from '../../shared/index.js'
|
||||||
import type { ResolvedSidebarItem } from '../../shared/resolved/sidebar.js'
|
|
||||||
import { useData } from './data.js'
|
import { useData } from './data.js'
|
||||||
import { useEncrypt } from './encrypt.js'
|
import { useEncrypt } from './encrypt.js'
|
||||||
|
|
||||||
|
|||||||
@ -10,9 +10,7 @@ import VPSkipLink from '@theme/VPSkipLink.vue'
|
|||||||
import VPFooter from '@theme/VPFooter.vue'
|
import VPFooter from '@theme/VPFooter.vue'
|
||||||
import VPBackToTop from '@theme/VPBackToTop.vue'
|
import VPBackToTop from '@theme/VPBackToTop.vue'
|
||||||
import VPEncryptGlobal from '@theme/VPEncryptGlobal.vue'
|
import VPEncryptGlobal from '@theme/VPEncryptGlobal.vue'
|
||||||
import { useCloseSidebarOnEscape, useSidebar } from '../composables/sidebar.js'
|
import { useCloseSidebarOnEscape, useData, useEncrypt, useSidebar } from '../composables/index.js'
|
||||||
import { useEncrypt } from '../composables/encrypt.js'
|
|
||||||
import { useData } from '../composables/data.js'
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isOpen: isSidebarOpen,
|
isOpen: isSidebarOpen,
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useRouteLocale, withBase } from 'vuepress/client'
|
|||||||
import VPNav from '@theme/Nav/VPNav.vue'
|
import VPNav from '@theme/Nav/VPNav.vue'
|
||||||
import VPSkipLink from '@theme/VPSkipLink.vue'
|
import VPSkipLink from '@theme/VPSkipLink.vue'
|
||||||
import VPFooter from '@theme/VPFooter.vue'
|
import VPFooter from '@theme/VPFooter.vue'
|
||||||
import { useData } from '../composables/data.js'
|
import { useData } from '../composables/index.js'
|
||||||
|
|
||||||
const root = useRouteLocale()
|
const root = useRouteLocale()
|
||||||
const { theme } = useData()
|
const { theme } = useData()
|
||||||
|
|||||||
@ -3,3 +3,4 @@ export * from './dom.js'
|
|||||||
export * from './resolveEditLink.js'
|
export * from './resolveEditLink.js'
|
||||||
export * from './resolveRepoType.js'
|
export * from './resolveRepoType.js'
|
||||||
export * from './resolveNavLink.js'
|
export * from './resolveNavLink.js'
|
||||||
|
export * from './animate.js'
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
isLinkAbsolute,
|
isLinkAbsolute,
|
||||||
isLinkWithProtocol,
|
isLinkWithProtocol,
|
||||||
} from '@vuepress/helper/client'
|
} from '@vuepress/helper/client'
|
||||||
import type { ResolvedNavItemWithLink } from '../../shared/resolved/navbar.js'
|
import type { ResolvedNavItemWithLink } from '../../shared/index.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve NavLink props from string
|
* Resolve NavLink props from string
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import type {
|
|||||||
AutoFrontmatterArray,
|
AutoFrontmatterArray,
|
||||||
AutoFrontmatterMarkdownFile,
|
AutoFrontmatterMarkdownFile,
|
||||||
AutoFrontmatterObject,
|
AutoFrontmatterObject,
|
||||||
} from '../../shared/auto-frontmatter.js'
|
PlumeThemeLocaleOptions,
|
||||||
import type { PlumeThemeLocaleOptions } from '../../shared/index.js'
|
} from '../../shared/index.js'
|
||||||
import { readMarkdown, readMarkdownList } from './readFile.js'
|
import { readMarkdown, readMarkdownList } from './readFile.js'
|
||||||
import { resolveOptions } from './resolveOptions.js'
|
import { resolveOptions } from './resolveOptions.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { fs, path } from 'vuepress/utils'
|
import { fs, path } from 'vuepress/utils'
|
||||||
import fg from 'fast-glob'
|
import fg from 'fast-glob'
|
||||||
import type { AutoFrontmatterMarkdownFile } from '../../shared/auto-frontmatter.js'
|
import type { AutoFrontmatterMarkdownFile } from '../../shared/index.js'
|
||||||
|
|
||||||
export async function readMarkdownList(
|
export async function readMarkdownList(
|
||||||
sourceDir: string,
|
sourceDir: string,
|
||||||
|
|||||||
@ -1,9 +1,4 @@
|
|||||||
import type {
|
import type { NavItem, NoteItem, NotesOptions, ThemeConfig } from '../shared/index.js'
|
||||||
NoteItem,
|
|
||||||
NotesOptions,
|
|
||||||
} from '../shared/notes.js'
|
|
||||||
import type { NavItem } from '../shared/index.js'
|
|
||||||
import type { ThemeConfig } from '../shared/theme-data.js'
|
|
||||||
|
|
||||||
export function definePlumeNotesConfig(notes: NotesOptions): NotesOptions {
|
export function definePlumeNotesConfig(notes: NotesOptions): NotesOptions {
|
||||||
return notes
|
return notes
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import process from 'node:process'
|
|||||||
import { pathToFileURL } from 'node:url'
|
import { pathToFileURL } from 'node:url'
|
||||||
import { build } from 'esbuild'
|
import { build } from 'esbuild'
|
||||||
import { importFileDefault } from 'vuepress/utils'
|
import { importFileDefault } from 'vuepress/utils'
|
||||||
import type { ThemeConfig } from '../../shared/theme-data.js'
|
import type { ThemeConfig } from '../../shared/index.js'
|
||||||
import { hash } from '../utils/index.js'
|
import { hash } from '../utils/index.js'
|
||||||
|
|
||||||
export async function compiler(configPath?: string,
|
export async function compiler(configPath?: string,
|
||||||
|
|||||||
@ -3,8 +3,7 @@ import type { FSWatcher } from 'chokidar'
|
|||||||
import { path } from 'vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import { watch } from 'chokidar'
|
import { watch } from 'chokidar'
|
||||||
import { deepMerge } from '@pengzhanbo/utils'
|
import { deepMerge } from '@pengzhanbo/utils'
|
||||||
import type { ThemeConfig } from '../../shared/theme-data.js'
|
import type { AutoFrontmatter, PlumeThemeEncrypt, PlumeThemeLocaleOptions, ThemeConfig } from '../../shared/index.js'
|
||||||
import type { AutoFrontmatter, PlumeThemeEncrypt, PlumeThemeLocaleOptions } from '../../shared/index.js'
|
|
||||||
import { resolveLocaleOptions } from '../config/resolveLocaleOptions.js'
|
import { resolveLocaleOptions } from '../config/resolveLocaleOptions.js'
|
||||||
import { findConfigPath } from './findConfigPath.js'
|
import { findConfigPath } from './findConfigPath.js'
|
||||||
import { compiler } from './compiler.js'
|
import { compiler } from './compiler.js'
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
|||||||
import { gitPlugin } from '@vuepress/plugin-git'
|
import { gitPlugin } from '@vuepress/plugin-git'
|
||||||
import { photoSwipePlugin } from '@vuepress/plugin-photo-swipe'
|
import { photoSwipePlugin } from '@vuepress/plugin-photo-swipe'
|
||||||
import { nprogressPlugin } from '@vuepress/plugin-nprogress'
|
import { nprogressPlugin } from '@vuepress/plugin-nprogress'
|
||||||
import { baiduTongjiPlugin } from '@vuepress-plume/plugin-baidu-tongji'
|
|
||||||
import { iconifyPlugin } from '@vuepress-plume/plugin-iconify'
|
import { iconifyPlugin } from '@vuepress-plume/plugin-iconify'
|
||||||
import { shikiPlugin } from '@vuepress-plume/plugin-shikiji'
|
import { shikiPlugin } from '@vuepress-plume/plugin-shikiji'
|
||||||
import { commentPlugin } from '@vuepress/plugin-comment'
|
import { commentPlugin } from '@vuepress/plugin-comment'
|
||||||
@ -149,10 +148,6 @@ export function getPlugins({
|
|||||||
plugins.push(commentPlugin(pluginOptions.comment))
|
plugins.push(commentPlugin(pluginOptions.comment))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pluginOptions.baiduTongji !== false && pluginOptions.baiduTongji?.key && isProd) {
|
|
||||||
plugins.push(baiduTongjiPlugin(pluginOptions.baiduTongji))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluginOptions.sitemap !== false && hostname && isProd) {
|
if (pluginOptions.sitemap !== false && hostname && isProd) {
|
||||||
plugins.push(sitemapPlugin({ hostname }))
|
plugins.push(sitemapPlugin({ hostname }))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,12 @@ import {
|
|||||||
import type {
|
import type {
|
||||||
PlumeThemeLocaleOptions,
|
PlumeThemeLocaleOptions,
|
||||||
PlumeThemePageData,
|
PlumeThemePageData,
|
||||||
|
ResolvedSidebarItem,
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarItem,
|
SidebarItem,
|
||||||
ThemeIcon,
|
ThemeIcon,
|
||||||
} from '../../shared/index.js'
|
} from '../../shared/index.js'
|
||||||
import { normalizeLink, resolveContent, writeTemp } from '../utils/index.js'
|
import { normalizeLink, resolveContent, writeTemp } from '../utils/index.js'
|
||||||
import type { ResolvedSidebarItem } from '../../shared/resolved/sidebar.js'
|
|
||||||
|
|
||||||
export async function prepareSidebar(app: App, localeOptions: PlumeThemeLocaleOptions) {
|
export async function prepareSidebar(app: App, localeOptions: PlumeThemeLocaleOptions) {
|
||||||
const sidebar = getAllSidebar(localeOptions)
|
const sidebar = getAllSidebar(localeOptions)
|
||||||
|
|||||||
@ -71,11 +71,12 @@ export function plumeTheme(options: PlumeThemeOptions = {}): Theme {
|
|||||||
await setupPage(app, localeOptions)
|
await setupPage(app, localeOptions)
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrepared: (app) => {
|
onPrepared: async (app) => {
|
||||||
onConfigChange(({ localeOptions }) => {
|
onConfigChange(({ localeOptions }) => {
|
||||||
prepareThemeData(app, localeOptions)
|
prepareThemeData(app, localeOptions)
|
||||||
prepareData(app)
|
prepareData(app)
|
||||||
})
|
})
|
||||||
|
await waitForConfigLoaded()
|
||||||
},
|
},
|
||||||
|
|
||||||
onWatched: (app, watchers) => {
|
onWatched: (app, watchers) => {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { ensureEndingSlash, ensureLeadingSlash, isLinkAbsolute, isLinkWithProtoc
|
|||||||
|
|
||||||
const __dirname = getDirname(import.meta.url)
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
export const resolve = (...args: string[]) => path.resolve(__dirname, '../../', ...args)
|
export const resolve = (...args: string[]) => path.resolve(__dirname, '../', ...args)
|
||||||
export const templates = (url: string) => resolve('../templates', url)
|
export const templates = (url: string) => resolve('../templates', url)
|
||||||
|
|
||||||
const RE_SLASH = /(\\|\/)+/g
|
const RE_SLASH = /(\\|\/)+/g
|
||||||
|
|||||||
@ -3,8 +3,9 @@ export * from './frontmatter/index.js'
|
|||||||
export * from './options/index.js'
|
export * from './options/index.js'
|
||||||
export * from './page-data.js'
|
export * from './page-data.js'
|
||||||
export * from './blog.js'
|
export * from './blog.js'
|
||||||
export * from './sidebar.js'
|
|
||||||
export * from './navbar.js'
|
|
||||||
export * from './notes.js'
|
export * from './notes.js'
|
||||||
export * from './auto-frontmatter.js'
|
export * from './auto-frontmatter.js'
|
||||||
export * from './theme-data.js'
|
export * from './theme-data.js'
|
||||||
|
export * from './sidebar.js'
|
||||||
|
export * from './navbar.js'
|
||||||
|
export * from './resolved/index.js'
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import type { DocsearchOptions } from '@vuepress/plugin-docsearch'
|
import type { DocsearchOptions } from '@vuepress/plugin-docsearch'
|
||||||
import type { SearchPluginOptions } from '@vuepress-plume/plugin-search'
|
import type { SearchPluginOptions } from '@vuepress-plume/plugin-search'
|
||||||
import type { BaiduTongjiOptions } from '@vuepress-plume/plugin-baidu-tongji'
|
|
||||||
import type { ShikiPluginOptions } from '@vuepress-plume/plugin-shikiji'
|
import type { ShikiPluginOptions } from '@vuepress-plume/plugin-shikiji'
|
||||||
import type { CommentPluginOptions } from '@vuepress/plugin-comment'
|
import type { CommentPluginOptions } from '@vuepress/plugin-comment'
|
||||||
import type { MarkdownEnhancePluginOptions } from 'vuepress-plugin-md-enhance'
|
import type { MarkdownEnhancePluginOptions } from 'vuepress-plugin-md-enhance'
|
||||||
@ -57,7 +56,11 @@ export interface PlumeThemePluginOptions {
|
|||||||
|
|
||||||
seo?: false
|
seo?: false
|
||||||
|
|
||||||
baiduTongji?: false | BaiduTongjiOptions
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* 请使用 [@vuepress/plugin-baidu-analytics](https://ecosystem.vuejs.press/zh/plugins/analytics/baidu-analytics.html) 代替
|
||||||
|
*/
|
||||||
|
baiduTongji?: never
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 使用 `autoFrontmatter` 代替
|
* @deprecated 使用 `autoFrontmatter` 代替
|
||||||
|
|||||||
2
theme/src/shared/resolved/index.ts
Normal file
2
theme/src/shared/resolved/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from './navbar.js'
|
||||||
|
export * from './sidebar.js'
|
||||||
Loading…
x
Reference in New Issue
Block a user