refactor(docs): split utils

This commit is contained in:
Neko Ayaka
2025-09-16 00:13:12 +08:00
parent c2b2f120e0
commit 84d7e08355
9 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import { useI18n } from 'vue-i18n'
import DocSidebarItem from '../components/DocSidebarItem.vue'
import { flatten } from '../functions/flatten'
import { flatten } from '../utils/flatten'
const { path } = toRefs(useRoute())
const { page, theme } = useData()
@@ -14,7 +14,7 @@ import { useData } from 'vitepress'
import { markRaw, nextTick, onMounted, ref, shallowRef, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { LRUCache } from '../functions/cache'
import { LRUCache } from '../utils/cache'
const emits = defineEmits<{
close: []
+1 -1
View File
@@ -12,7 +12,7 @@ import DocOutline from '../components/DocOutline.vue'
import DocSidebar from '../components/DocSidebar.vue'
import DocTopbar from '../components/DocTopbar.vue'
import { flatten } from '../functions/flatten'
import { flatten } from '../utils/flatten'
const { theme, frontmatter } = useData()
const { path } = toRefs(useRoute())
@@ -2,7 +2,7 @@ import type { SiteConfig } from 'vitepress'
import { createContentLoader } from 'vitepress'
import { formatDate } from './utils'
import { formatDate } from '../utils/utils'
const config: SiteConfig = (globalThis as any).VITEPRESS_CONFIG
+1 -1
View File
@@ -8,7 +8,7 @@ import { env } from 'node:process'
import { dirname, join } from 'pathe'
import { createContentLoader } from 'vitepress'
import { formatDate } from './utils'
import { formatDate } from '../utils/utils'
const config: SiteConfig = (globalThis as any).VITEPRESS_CONFIG
const base = config.userConfig.base || env.BASE_URL || '/'
+1 -1
View File
@@ -2,7 +2,7 @@ import type { SiteConfig } from 'vitepress'
import { createContentLoader } from 'vitepress'
import { formatDate } from './utils'
import { formatDate } from '../utils/utils'
const config: SiteConfig = (globalThis as any).VITEPRESS_CONFIG