diff --git a/packages/valaxy-theme-yun/components/YunFooter.vue b/packages/valaxy-theme-yun/components/YunFooter.vue
index e1e66da0..efda6c3f 100644
--- a/packages/valaxy-theme-yun/components/YunFooter.vue
+++ b/packages/valaxy-theme-yun/components/YunFooter.vue
@@ -2,17 +2,24 @@
import { capitalize, computed } from 'vue'
import { useConfig } from 'valaxy'
import { useI18n } from 'vue-i18n'
+import pkg from 'valaxy/package.json'
import { useThemeConfig } from '../composables'
+
+const { t } = useI18n()
const config = useConfig()
const themeConfig = useThemeConfig()
const year = new Date().getFullYear()
+
const isThisYear = computed(() => {
return year === themeConfig.value.footer.since
})
-const { t } = useI18n()
-const poweredHtml = computed(() => t('footer.powered', [`
Valaxy v${config.value.pkg.version}`]))
-const footerIcon = computed(() => themeConfig.value.footer.icon || { url: config.value.pkg.repository, name: config.value.pkg.name })
+const poweredHtml = computed(() => t('footer.powered', [`
Valaxy v${pkg.version}`]))
+const footerIcon = computed(() => themeConfig.value.footer.icon || {
+ url: pkg.repository,
+ name: 'i-ri-cloud-line',
+ title: pkg.name,
+})
diff --git a/packages/valaxy/client/components/ValaxyMain.vue b/packages/valaxy/client/components/ValaxyMain.vue
new file mode 100644
index 00000000..3b685778
--- /dev/null
+++ b/packages/valaxy/client/components/ValaxyMain.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/valaxy/client/config.ts b/packages/valaxy/client/config.ts
index 3f25bfd9..84e6f19f 100644
--- a/packages/valaxy/client/config.ts
+++ b/packages/valaxy/client/config.ts
@@ -33,12 +33,12 @@ export const valaxyContextRef = shallowRef(parse(v
if (import.meta.hot) {
// /@valaxyjs/site must be static string
import.meta.hot.accept('/@valaxyjs/site', (m) => {
- valaxySiteConfigRef.value = parse(m.default)
+ valaxySiteConfigRef.value = parse(m?.default)
})
// context
import.meta.hot.accept('/@valaxyjs/context', (m) => {
- valaxyContextRef.value = parse(m.default)
+ valaxyContextRef.value = parse(m?.default)
})
}
diff --git a/packages/valaxy/node/config.ts b/packages/valaxy/node/config.ts
index a26d000e..d85b2348 100644
--- a/packages/valaxy/node/config.ts
+++ b/packages/valaxy/node/config.ts
@@ -1,7 +1,6 @@
import type { VitePluginConfig as UnoCssConfig } from 'unocss/vite'
import type { Awaitable } from '@antfu/utils'
import type { DefaultThemeConfig, SiteConfig, UserSiteConfig } from '../types'
-import pkg from '../package.json'
import type { ResolvedValaxyOptions } from './options'
import type { UserConfig, ValaxyAddonResolver, ValaxyConfig } from './types'
@@ -44,7 +43,6 @@ export function defineAddon(
}
export const defaultSiteConfig: SiteConfig = {
- pkg,
mode: 'auto',
url: '/',
lang: 'en',
diff --git a/packages/valaxy/node/types.ts b/packages/valaxy/node/types.ts
index 5aaf49e0..93919395 100644
--- a/packages/valaxy/node/types.ts
+++ b/packages/valaxy/node/types.ts
@@ -5,11 +5,10 @@ import type Pages from 'vite-plugin-pages'
import type { UserConfig as ViteUserConfig } from 'vite'
import type { presetAttributify, presetIcons, presetTypography, presetUno } from 'unocss'
import type { DefaultThemeConfig, UserSiteConfig } from '../types'
-import type ValaxyPackage from '../package.json'
import type { ResolvedValaxyOptions } from './options'
import type { MarkdownOptions } from './markdown'
-export type ValaxyConfig = UserSiteConfig & ValaxyExtendConfig & { pkg: typeof ValaxyPackage }
+export type ValaxyConfig = UserSiteConfig & ValaxyExtendConfig
export type UserConfig = ValaxyConfig
/**
* fn with options for theme config
diff --git a/packages/valaxy/types/config.ts b/packages/valaxy/types/config.ts
index 6b5ab166..27293958 100644
--- a/packages/valaxy/types/config.ts
+++ b/packages/valaxy/types/config.ts
@@ -1,5 +1,3 @@
-import type ValaxyPackage from '../package.json'
-
export type DefaultThemeConfig = Record
export interface SocialLink {
@@ -29,10 +27,6 @@ export interface AlgoliaSearchOptions {
// shared with valaxy node and client
export interface SiteConfig {
- /**
- * valaxy package.json
- */
- pkg: typeof ValaxyPackage
/**
* enable auto (light/dark mode)
* @default 'auto'