valaxy-theme-hairy 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,9 +16,9 @@ const router = useRouter()
16
16
  const post = computed(() => {
17
17
  const clone = [...props.posts].map(v => ({
18
18
  ...v,
19
- date: v.updated instanceof Date
20
- ? v.updated.valueOf()
21
- : new Date(v.updated || Date.now()).valueOf(),
19
+ date: v.date instanceof Date
20
+ ? v.date.valueOf()
21
+ : new Date(v.date || Date.now()).valueOf(),
22
22
  }))
23
23
  clone.sort((b, a) => a.date - b.date)
24
24
  return clone[0]
@@ -64,7 +64,7 @@ function displayCategory(keys: string | string[] = []) {
64
64
  <div class="lt-md:hidden flex items-center gap-2">
65
65
  <div class="i-material-symbols-folder-open-rounded text-14px" />
66
66
  <ElTag size="small" class="dark:bg-dark-50 cursor-pointer border-none!" @click="displayCategory(post.categories)">
67
- {{ post.categories }}
67
+ {{ toArray(post.categories).map($t).join('/') }}
68
68
  </ElTag>
69
69
  </div>
70
70
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-hairy",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "packageManager": "pnpm@8.15.8",
5
5
  "author": {
6
6
  "email": "wwu710632@gmail.com",
package/valaxy.config.ts CHANGED
@@ -1,14 +1,10 @@
1
1
  import type { DefaultTheme, ValaxyTheme } from 'valaxy'
2
2
  import { defineTheme, mergeValaxyConfig } from 'valaxy'
3
- import { addonAlgolia } from 'valaxy-addon-algolia'
4
3
  import { withImageConfig, withThemeConfig } from './node'
5
4
  import type { ThemeConfig } from './types'
6
5
 
7
6
  export default defineTheme<ThemeConfig>((options) => {
8
7
  let config: ValaxyTheme<ThemeConfig & DefaultTheme.Config> = {
9
- addons: [
10
- addonAlgolia(),
11
- ],
12
8
  themeConfig: {
13
9
  valaxyDarkOptions: {
14
10
  useDarkOptions: { disableTransition: false },
@@ -20,6 +16,9 @@ export default defineTheme<ThemeConfig>((options) => {
20
16
  post: 'image:slice:reverse',
21
17
  },
22
18
  },
19
+ vite: {
20
+ optimizeDeps: { include: ['dayjs', 'element-plus'] },
21
+ },
23
22
  }
24
23
 
25
24
  config = mergeValaxyConfig(config, withImageConfig(options))