valaxy 0.25.10 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,21 +120,7 @@ interface Photo {
120
120
  caption: string;
121
121
  desc: string;
122
122
  }
123
- interface PageFrontMatter extends Record<string, any> {
124
- /**
125
- * Path of post
126
- * route.path
127
- * @description 路径
128
- */
129
- path: string;
130
- /**
131
- * abbrlink
132
- *
133
- * generated by valaxy-addon-abbrlink, do not manually modify
134
- *
135
- * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
136
- */
137
- abbrlink: string;
123
+ interface BaseFrontMatter extends Record<string, any> {
138
124
  /**
139
125
  * Title
140
126
  * @description 文章标题
@@ -145,6 +131,8 @@ interface PageFrontMatter extends Record<string, any> {
145
131
  * ---
146
132
  * ```
147
133
  *
134
+ * i18n:
135
+ *
148
136
  * ```md
149
137
  * ---
150
138
  * title:
@@ -154,11 +142,31 @@ interface PageFrontMatter extends Record<string, any> {
154
142
  * ```
155
143
  */
156
144
  title: string | Record<string, string>;
145
+ /**
146
+ * @description:en-US Created Date
147
+ * @description:zh-CN 文章创建日期
148
+ */
157
149
  date: string | number | Date;
158
150
  /**
159
151
  * Updated Time
160
152
  */
161
153
  updated: string | number | Date;
154
+ }
155
+ interface PageFrontMatter extends BaseFrontMatter {
156
+ /**
157
+ * Path of post
158
+ * route.path
159
+ * @description 路径
160
+ */
161
+ path: string;
162
+ /**
163
+ * abbrlink
164
+ *
165
+ * generated by valaxy-addon-abbrlink, do not manually modify
166
+ *
167
+ * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
168
+ */
169
+ abbrlink: string;
162
170
  /**
163
171
  * i18n
164
172
  */
@@ -178,6 +186,10 @@ interface PageFrontMatter extends Record<string, any> {
178
186
  * @description 是否显示文章底部版权信息
179
187
  */
180
188
  copyright: boolean;
189
+ /**
190
+ * for seo
191
+ * schema
192
+ */
181
193
  image: NodeRelations<ImageObject | string>;
182
194
  /**
183
195
  * cover
@@ -816,4 +828,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
816
828
  */
817
829
  type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
818
830
 
819
- export { type Album as A, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RuntimeConfig as R, type SiteConfig as S, type UserSiteConfig as U, type ValaxyConfig as V, type ValaxyAddon as a, type RedirectItem as b, type PostFrontMatter as c, type PageFrontMatter as d, type SocialLink as e, type RedirectRule as f, type Pkg as g, type UserValaxyConfig as h, type Photo as i };
831
+ export { type Album as A, type BaseFrontMatter as B, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RedirectRule as R, type SocialLink as S, type UserSiteConfig as U, type ValaxyAddon as V, type PostFrontMatter as a, type PageFrontMatter as b, type RedirectItem as c, type SiteConfig as d, type RuntimeConfig as e, type Pkg as f, type ValaxyConfig as g, type UserValaxyConfig as h, type Photo as i };
@@ -3,7 +3,7 @@ import {
3
3
  registerDevCommand,
4
4
  run,
5
5
  startValaxyDev
6
- } from "../../chunk-JHXXCWZC.js";
6
+ } from "../../chunk-INEH2Z2Z.js";
7
7
  export {
8
8
  cli,
9
9
  registerDevCommand,
@@ -1,13 +1,14 @@
1
1
  import { ViteSSGOptions } from 'vite-ssg';
2
2
  import * as vite from 'vite';
3
- import { UserConfig, InlineConfig, PluginOption, Plugin } from 'vite';
3
+ import { UserConfig, InlineConfig, ViteDevServer, PluginOption, Plugin } from 'vite';
4
4
  import { MarkdownEnv } from 'unplugin-vue-markdown/types';
5
- import { D as DefaultTheme, V as ValaxyConfig, a as ValaxyAddon, P as PartialDeep, R as RuntimeConfig, b as RedirectItem, S as SiteConfig, U as UserSiteConfig } from '../config-bf4WqwPK.js';
5
+ import * as valaxy_types from 'valaxy/types';
6
+ import { DefaultTheme, ValaxyConfig, ValaxyAddon, PartialDeep, RuntimeConfig, RedirectItem, SiteConfig, UserSiteConfig } from 'valaxy/types';
6
7
  import Vue from '@vitejs/plugin-vue';
7
8
  import { Options as Options$2 } from 'beasties';
8
9
  import { Hookable } from 'hookable';
9
10
  import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
10
- import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
11
+ import { presetUno, presetAttributify, presetIcons, presetTypography, presetWind4 } from 'unocss';
11
12
  import { VitePluginConfig } from 'unocss/vite';
12
13
  import Components from 'unplugin-vue-components/vite';
13
14
  import Markdown from 'unplugin-vue-markdown/vite';
@@ -25,14 +26,15 @@ import { Options, MarkdownItAsync } from 'markdown-it-async';
25
26
  import { ThemeRegistration, BuiltinTheme, LanguageInput, ShikiTransformer, Highlighter } from 'shiki';
26
27
  export { cli, registerDevCommand, run, startValaxyDev } from './cli/index.js';
27
28
  import { Awaitable } from '@antfu/utils';
29
+ import { V as ValaxyAddon$1, D as DefaultTheme$1, P as PartialDeep$1 } from '../config-Dz-VnMOz.js';
28
30
  import * as defu from 'defu';
31
+ import 'yargs';
29
32
  import '@vueuse/integrations/useFuse';
30
33
  import 'medium-zoom';
31
34
  import 'vanilla-lazyload';
32
35
  import 'vue-router';
33
36
  import '@vueuse/core';
34
37
  import '@unhead/schema-org';
35
- import 'yargs';
36
38
 
37
39
  declare module 'vite' {
38
40
  interface UserConfig {
@@ -327,10 +329,14 @@ interface ValaxyExtendConfig {
327
329
  * @see https://unocss.dev/guide/presets
328
330
  */
329
331
  unocssPresets?: {
332
+ /**
333
+ * @deprecated use wind4 instead
334
+ */
330
335
  uno?: Parameters<typeof presetUno>[0];
331
336
  attributify?: Parameters<typeof presetAttributify>[0];
332
337
  icons?: Parameters<typeof presetIcons>[0];
333
338
  typography?: Parameters<typeof presetTypography>[0];
339
+ wind4?: Parameters<typeof presetWind4>[0];
334
340
  };
335
341
  fuse?: {
336
342
  /**
@@ -521,9 +527,9 @@ declare function mergeViteConfigs({ userRoot, themeRoot }: ResolvedValaxyOptions
521
527
  */
522
528
  declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions, rawHtml: string): Promise<string>;
523
529
 
524
- declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
530
+ declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
525
531
  setup?: ValaxyAddonResolver['setup'];
526
- }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
532
+ }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
527
533
  setup?: ValaxyAddonResolver["setup"];
528
534
  };
529
535
  declare const defineAddon: typeof defineValaxyAddon;
@@ -538,10 +544,6 @@ interface ResolvedConfig<T extends UserInputConfig = UserInputConfig> {
538
544
  config: T;
539
545
  configFile: string;
540
546
  }
541
- declare function loadConfig<T extends UserInputConfig = UserInputConfig>(options: {
542
- name: string;
543
- cwd: string;
544
- }): Promise<ResolvedConfig<T>>;
545
547
  declare function loadConfigFromFile<T extends UserInputConfig>(file: string, options?: LoadConfigFromFileOptions): Promise<ResolvedConfig<T>>;
546
548
 
547
549
  declare const defaultSiteConfig: SiteConfig;
@@ -549,44 +551,44 @@ declare const defaultSiteConfig: SiteConfig;
549
551
  * Type helper for site.config.ts
550
552
  * @param config
551
553
  */
552
- declare function defineSiteConfig(config: UserSiteConfig): PartialDeep<SiteConfig>;
554
+ declare function defineSiteConfig(config: UserSiteConfig): valaxy_types.PartialDeep<SiteConfig>;
553
555
  /**
554
556
  * resolve valaxy config from special root
555
557
  */
556
- declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<PartialDeep<SiteConfig>>>;
558
+ declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<valaxy_types.PartialDeep<SiteConfig>>>;
557
559
  /**
558
560
  * resolve site.config.ts and merge with default
559
561
  * @param root
560
562
  */
561
563
  declare function resolveSiteConfig(root: string): Promise<{
562
- siteConfig: PartialDeep<SiteConfig>;
564
+ siteConfig: valaxy_types.PartialDeep<SiteConfig>;
563
565
  siteConfigFile: string;
564
566
  }>;
565
567
 
566
568
  /**
567
569
  * resolve theme config from special root
568
570
  */
569
- declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme.Config>>;
571
+ declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme$1.Config>>;
570
572
  /**
571
573
  * resolve theme.config.ts and merge with default
572
574
  */
573
575
  declare function resolveUserThemeConfig(options: ResolvedValaxyOptions): Promise<{
574
- themeConfig: DefaultTheme.Config;
576
+ themeConfig: DefaultTheme$1.Config;
575
577
  themeConfigFile: string;
576
578
  }>;
577
579
  type ValaxyConfigExtendKey = 'vite' | 'vue' | 'unocss' | 'unocssPresets' | 'markdown' | 'extendMd' | 'addons';
578
580
  type ValaxyPickConfig = Pick<ValaxyNodeConfig, ValaxyConfigExtendKey>;
579
- type ValaxyTheme<ThemeConfig = DefaultTheme.Config> = ValaxyPickConfig & {
581
+ type ValaxyTheme<ThemeConfig = DefaultTheme$1.Config> = ValaxyPickConfig & {
580
582
  themeConfig?: ThemeConfig;
581
583
  };
582
- declare function defineValaxyTheme<ThemeConfig = DefaultTheme.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
584
+ declare function defineValaxyTheme<ThemeConfig = DefaultTheme$1.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
583
585
  declare const defineTheme: typeof defineValaxyTheme;
584
586
 
585
587
  declare const defaultValaxyConfig: ValaxyNodeConfig;
586
588
  /**
587
589
  * Type helper for valaxy.config.ts
588
590
  */
589
- declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep<ValaxyNodeConfig<ThemeConfig>>;
591
+ declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep$1<ValaxyNodeConfig<ThemeConfig>>;
590
592
  declare const defineConfig: typeof defineValaxyConfig;
591
593
  declare function resolveValaxyConfigFromRoot(root: string, options?: ResolvedValaxyOptions): Promise<ResolvedConfig<ValaxyNodeConfig>>;
592
594
  /**
@@ -626,6 +628,11 @@ declare const customElements: Set<string>;
626
628
  */
627
629
  declare const defaultViteConfig: UserConfig;
628
630
 
631
+ declare const GLOBAL_STATE: {
632
+ valaxyApp: ValaxyApp | undefined;
633
+ server: ViteDevServer | undefined;
634
+ };
635
+
629
636
  declare function ViteValaxyPlugins(valaxyApp: ValaxyNode, serverOptions?: ValaxyServerOptions): Promise<(PluginOption | PluginOption[])[]>;
630
637
 
631
638
  /**
@@ -686,4 +693,4 @@ declare function toAtFS(path: string): string;
686
693
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
687
694
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
688
695
 
689
- export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
696
+ export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
@@ -2,6 +2,7 @@ import {
2
2
  $t,
3
3
  ALL_ROUTE,
4
4
  EXCERPT_SEPARATOR,
5
+ GLOBAL_STATE,
5
6
  PATHNAME_PROTOCOL_RE,
6
7
  ViteValaxyPlugins,
7
8
  build,
@@ -27,7 +28,6 @@ import {
27
28
  isExternal,
28
29
  isInstalledGlobally,
29
30
  isPath,
30
- loadConfig,
31
31
  loadConfigFromFile,
32
32
  mergeValaxyConfig,
33
33
  mergeViteConfigs,
@@ -50,11 +50,12 @@ import {
50
50
  startValaxyDev,
51
51
  toAtFS,
52
52
  transformObject
53
- } from "../chunk-JHXXCWZC.js";
53
+ } from "../chunk-INEH2Z2Z.js";
54
54
  export {
55
55
  $t,
56
56
  ALL_ROUTE,
57
57
  EXCERPT_SEPARATOR,
58
+ GLOBAL_STATE,
58
59
  PATHNAME_PROTOCOL_RE,
59
60
  ViteValaxyPlugins,
60
61
  build,
@@ -80,7 +81,6 @@ export {
80
81
  isExternal,
81
82
  isInstalledGlobally,
82
83
  isPath,
83
- loadConfig,
84
84
  loadConfigFromFile,
85
85
  mergeValaxyConfig,
86
86
  mergeViteConfigs,
@@ -1,5 +1,5 @@
1
- import { c as PostFrontMatter, d as PageFrontMatter } from '../config-bf4WqwPK.js';
2
- export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, P as PartialDeep, i as Photo, g as Pkg, b as RedirectItem, f as RedirectRule, R as RuntimeConfig, S as SiteConfig, e as SocialLink, U as UserSiteConfig, h as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-bf4WqwPK.js';
1
+ import { a as PostFrontMatter, b as PageFrontMatter } from '../config-Dz-VnMOz.js';
2
+ export { A as Album, B as BaseFrontMatter, D as DefaultTheme, E as ExcerptType, F as FuseListItem, P as PartialDeep, i as Photo, f as Pkg, c as RedirectItem, R as RedirectRule, e as RuntimeConfig, d as SiteConfig, S as SocialLink, U as UserSiteConfig, h as UserValaxyConfig, V as ValaxyAddon, g as ValaxyConfig } from '../config-Dz-VnMOz.js';
3
3
  import { Header } from '@valaxyjs/utils';
4
4
  import '@vueuse/integrations/useFuse';
5
5
  import 'medium-zoom';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.25.10",
4
+ "version": "0.26.0",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -25,7 +25,7 @@
25
25
  "default": "./dist/node/index.js"
26
26
  },
27
27
  "./client/*": "./client/*",
28
- "./client": "./client/index.ts",
28
+ "./client": "./client/shims.d.ts",
29
29
  "./node": {
30
30
  "types": "./dist/node/index.d.ts",
31
31
  "default": "./dist/node/index.js"
@@ -58,21 +58,22 @@
58
58
  "@clack/prompts": "^0.11.0",
59
59
  "@iconify-json/ri": "^1.2.5",
60
60
  "@intlify/unplugin-vue-i18n": "^6.0.8",
61
- "@shikijs/transformers": "^3.8.1",
61
+ "@shikijs/transformers": "^3.9.1",
62
62
  "@types/katex": "^0.16.7",
63
- "@unhead/addons": "^2.0.12",
64
- "@unhead/schema-org": "^2.0.12",
65
- "@unhead/vue": "^2.0.12",
66
- "@vitejs/plugin-vue": "^6.0.0",
63
+ "@unhead/addons": "^2.0.13",
64
+ "@unhead/schema-org": "^2.0.13",
65
+ "@unhead/vue": "^2.0.13",
66
+ "@vitejs/plugin-vue": "^6.0.1",
67
67
  "@vue/devtools-api": "7.7.2",
68
- "@vueuse/core": "^13.5.0",
69
- "@vueuse/integrations": "^13.5.0",
68
+ "@vueuse/core": "^13.6.0",
69
+ "@vueuse/integrations": "^13.6.0",
70
70
  "beasties": "^0.3.5",
71
71
  "consola": "^3.4.2",
72
72
  "cross-spawn": "^7.0.6",
73
73
  "css-i18n": "^0.0.5",
74
74
  "dayjs": "^1.11.13",
75
75
  "debug": "^4.4.1",
76
+ "define-config-ts": "^0.1.2",
76
77
  "defu": "^6.1.4",
77
78
  "ejs": "^3.1.10",
78
79
  "escape-html": "^1.0.3",
@@ -84,7 +85,7 @@
84
85
  "gray-matter": "^4.0.3",
85
86
  "hookable": "^5.5.3",
86
87
  "html-to-text": "^9.0.5",
87
- "jiti": "^2.4.2",
88
+ "jiti": "^2.5.1",
88
89
  "js-base64": "^3.7.7",
89
90
  "js-yaml": "^4.1.0",
90
91
  "katex": "^0.16.22",
@@ -111,28 +112,28 @@
111
112
  "qrcode": "^1.5.4",
112
113
  "resolve-global": "^2.0.0",
113
114
  "sass": "^1.89.2",
114
- "shiki": "^3.8.1",
115
+ "shiki": "^3.9.1",
115
116
  "star-markdown-css": "^0.5.3",
116
117
  "table": "^6.9.0",
117
- "unhead": "^2.0.12",
118
- "unocss": "^66.3.3",
118
+ "unhead": "^2.0.13",
119
+ "unocss": "^66.4.0",
119
120
  "unplugin-vue-components": "28.0.0",
120
121
  "unplugin-vue-markdown": "^29.1.0",
121
122
  "unplugin-vue-router": "^0.14.0",
122
123
  "vanilla-lazyload": "^19.1.3",
123
- "vite": "^7.0.5",
124
+ "vite": "^7.0.6",
124
125
  "vite-dev-rpc": "^1.1.0",
125
- "vite-plugin-vue-devtools": "^7.7.7",
126
+ "vite-plugin-vue-devtools": "^8.0.0",
126
127
  "vite-plugin-vue-layouts": "^0.11.0",
127
128
  "vite-ssg": "^28.0.0",
128
129
  "vite-ssg-sitemap": "^0.10.0",
129
130
  "vitepress-plugin-group-icons": "^1.6.1",
130
- "vue": "^3.5.17",
131
- "vue-i18n": "^11.1.10",
131
+ "vue": "^3.5.18",
132
+ "vue-i18n": "^11.1.11",
132
133
  "vue-router": "^4.5.1",
133
134
  "yargs": "^18.0.0",
134
- "@valaxyjs/devtools": "0.25.10",
135
- "@valaxyjs/utils": "0.25.10"
135
+ "@valaxyjs/devtools": "0.26.0",
136
+ "@valaxyjs/utils": "0.26.0"
136
137
  },
137
138
  "devDependencies": {
138
139
  "@mdit-vue/plugin-component": "^2.1.4",
package/shims.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { Header } from '@valaxyjs/utils'
2
2
 
3
- // import './client/typed-router'
4
-
5
3
  import type { Ref } from 'vue'
4
+
6
5
  import type { Post } from './types'
7
6
  import 'vue-router'
7
+ import './client/shims'
8
8
 
9
9
  declare module 'valaxy-addon-*'
10
10
  declare module '@docsearch/js' {
package/types/config.ts CHANGED
@@ -2,7 +2,7 @@ import type { FuseOptions } from '@vueuse/integrations/useFuse'
2
2
  import type { ZoomOptions } from 'medium-zoom'
3
3
  import type { ILazyLoadOptions } from 'vanilla-lazyload'
4
4
  import type { RouteRecordRaw } from 'vue-router'
5
- import type { ValaxyAddon } from '../types'
5
+ import type { ValaxyAddon } from './addon'
6
6
  import type { DefaultTheme } from './default-theme'
7
7
  import type { PostFrontMatter } from './frontmatter'
8
8
  import type { FuseListItem } from './node'
@@ -27,21 +27,7 @@ export interface Photo {
27
27
  desc: string
28
28
  }
29
29
 
30
- export interface PageFrontMatter extends Record<string, any> {
31
- /**
32
- * Path of post
33
- * route.path
34
- * @description 路径
35
- */
36
- path: string
37
- /**
38
- * abbrlink
39
- *
40
- * generated by valaxy-addon-abbrlink, do not manually modify
41
- *
42
- * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
43
- */
44
- abbrlink: string
30
+ export interface BaseFrontMatter extends Record<string, any> {
45
31
  /**
46
32
  * Title
47
33
  * @description 文章标题
@@ -52,6 +38,8 @@ export interface PageFrontMatter extends Record<string, any> {
52
38
  * ---
53
39
  * ```
54
40
  *
41
+ * i18n:
42
+ *
55
43
  * ```md
56
44
  * ---
57
45
  * title:
@@ -61,11 +49,33 @@ export interface PageFrontMatter extends Record<string, any> {
61
49
  * ```
62
50
  */
63
51
  title: string | Record<string, string>
52
+ /**
53
+ * @description:en-US Created Date
54
+ * @description:zh-CN 文章创建日期
55
+ */
64
56
  date: string | number | Date
65
57
  /**
66
58
  * Updated Time
67
59
  */
68
60
  updated: string | number | Date
61
+ }
62
+
63
+ export interface PageFrontMatter extends BaseFrontMatter {
64
+ /**
65
+ * Path of post
66
+ * route.path
67
+ * @description 路径
68
+ */
69
+ path: string
70
+ /**
71
+ * abbrlink
72
+ *
73
+ * generated by valaxy-addon-abbrlink, do not manually modify
74
+ *
75
+ * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
76
+ */
77
+ abbrlink: string
78
+
69
79
  /**
70
80
  * i18n
71
81
  */
@@ -88,7 +98,10 @@ export interface PageFrontMatter extends Record<string, any> {
88
98
  */
89
99
  copyright: boolean
90
100
 
91
- // schema
101
+ /**
102
+ * for seo
103
+ * schema
104
+ */
92
105
  image: NodeRelations<ImageObject | string>
93
106
 
94
107
  /**