mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 08:52:42 +00:00
refactor(docs): split utils
This commit is contained in:
@@ -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: []
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 || '/'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user