valaxy 0.17.3 → 0.17.4
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.
- package/client/main.ts +10 -4
- package/dist/{chunk-HZ4FMCTT.mjs → chunk-UTVJER4P.mjs} +49 -49
- package/dist/{chunk-T4SN3XT6.cjs → chunk-VJXQXPVC.cjs} +48 -48
- package/dist/{config-hKSeaczj.d.cts → config-hM2lXH4J.d.cts} +19 -2
- package/dist/{config-hKSeaczj.d.ts → config-hM2lXH4J.d.ts} +19 -2
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +11 -2
- package/dist/node/index.d.ts +11 -2
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +4 -4
- package/shims.d.ts +8 -0
- package/types/config.ts +14 -1
- package/types/posts.ts +5 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ZoomOptions } from 'medium-zoom';
|
|
2
2
|
import { FuseOptions } from '@vueuse/integrations/useFuse';
|
|
3
3
|
import { ILazyLoadOptions } from 'vanilla-lazyload';
|
|
4
|
+
import { RouteRecordRaw } from 'vue-router';
|
|
4
5
|
import { NodeRelations, ImageObject } from '@unhead/schema-org';
|
|
5
6
|
|
|
6
7
|
interface ValaxyAddon<AddonOptions = Record<string, any>> {
|
|
@@ -185,6 +186,11 @@ interface PageFrontMatter extends Record<string, any> {
|
|
|
185
186
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
186
187
|
*/
|
|
187
188
|
codeHeightLimit?: number;
|
|
189
|
+
/**
|
|
190
|
+
* @description:en-US Source path for client redirection
|
|
191
|
+
* @description:zh-CN 客户端重定向的源路径
|
|
192
|
+
*/
|
|
193
|
+
from?: string | string[];
|
|
188
194
|
}
|
|
189
195
|
interface PostFrontMatter extends PageFrontMatter {
|
|
190
196
|
/**
|
|
@@ -279,6 +285,10 @@ interface RedirectRule {
|
|
|
279
285
|
to: string;
|
|
280
286
|
from: string | string[];
|
|
281
287
|
}
|
|
288
|
+
interface RedirectItem {
|
|
289
|
+
from: string;
|
|
290
|
+
to: string;
|
|
291
|
+
}
|
|
282
292
|
interface SiteConfig {
|
|
283
293
|
/**
|
|
284
294
|
* enable auto (light/dark mode)
|
|
@@ -552,7 +562,10 @@ interface SiteConfig {
|
|
|
552
562
|
* @description:en-US client redirect rules
|
|
553
563
|
* @description:zh-CN 客户端重定向规则
|
|
554
564
|
*/
|
|
555
|
-
redirects?:
|
|
565
|
+
redirects?: {
|
|
566
|
+
useVueRouter?: boolean;
|
|
567
|
+
rules?: RedirectRule[];
|
|
568
|
+
};
|
|
556
569
|
}
|
|
557
570
|
type PartialDeep<T> = {
|
|
558
571
|
[P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
@@ -562,6 +575,10 @@ type PartialDeep<T> = {
|
|
|
562
575
|
*/
|
|
563
576
|
interface RuntimeConfig {
|
|
564
577
|
addons: Record<string, ValaxyAddon>;
|
|
578
|
+
redirects: {
|
|
579
|
+
useVueRouter: boolean;
|
|
580
|
+
redirectRoutes: RouteRecordRaw[];
|
|
581
|
+
};
|
|
565
582
|
}
|
|
566
583
|
interface Pkg {
|
|
567
584
|
name: string;
|
|
@@ -604,4 +621,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
|
|
|
604
621
|
*/
|
|
605
622
|
type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
606
623
|
|
|
607
|
-
export { type Album as A, 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 Post as a, type
|
|
624
|
+
export { type Album as A, 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 Post as a, type RedirectItem as b, type SiteConfig as c, type RuntimeConfig as d, type Pkg as e, type ValaxyConfig as f, type UserValaxyConfig as g, type Photo as h, type PageFrontMatter as i, type PostFrontMatter as j, type Page as k };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ZoomOptions } from 'medium-zoom';
|
|
2
2
|
import { FuseOptions } from '@vueuse/integrations/useFuse';
|
|
3
3
|
import { ILazyLoadOptions } from 'vanilla-lazyload';
|
|
4
|
+
import { RouteRecordRaw } from 'vue-router';
|
|
4
5
|
import { NodeRelations, ImageObject } from '@unhead/schema-org';
|
|
5
6
|
|
|
6
7
|
interface ValaxyAddon<AddonOptions = Record<string, any>> {
|
|
@@ -185,6 +186,11 @@ interface PageFrontMatter extends Record<string, any> {
|
|
|
185
186
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
186
187
|
*/
|
|
187
188
|
codeHeightLimit?: number;
|
|
189
|
+
/**
|
|
190
|
+
* @description:en-US Source path for client redirection
|
|
191
|
+
* @description:zh-CN 客户端重定向的源路径
|
|
192
|
+
*/
|
|
193
|
+
from?: string | string[];
|
|
188
194
|
}
|
|
189
195
|
interface PostFrontMatter extends PageFrontMatter {
|
|
190
196
|
/**
|
|
@@ -279,6 +285,10 @@ interface RedirectRule {
|
|
|
279
285
|
to: string;
|
|
280
286
|
from: string | string[];
|
|
281
287
|
}
|
|
288
|
+
interface RedirectItem {
|
|
289
|
+
from: string;
|
|
290
|
+
to: string;
|
|
291
|
+
}
|
|
282
292
|
interface SiteConfig {
|
|
283
293
|
/**
|
|
284
294
|
* enable auto (light/dark mode)
|
|
@@ -552,7 +562,10 @@ interface SiteConfig {
|
|
|
552
562
|
* @description:en-US client redirect rules
|
|
553
563
|
* @description:zh-CN 客户端重定向规则
|
|
554
564
|
*/
|
|
555
|
-
redirects?:
|
|
565
|
+
redirects?: {
|
|
566
|
+
useVueRouter?: boolean;
|
|
567
|
+
rules?: RedirectRule[];
|
|
568
|
+
};
|
|
556
569
|
}
|
|
557
570
|
type PartialDeep<T> = {
|
|
558
571
|
[P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
@@ -562,6 +575,10 @@ type PartialDeep<T> = {
|
|
|
562
575
|
*/
|
|
563
576
|
interface RuntimeConfig {
|
|
564
577
|
addons: Record<string, ValaxyAddon>;
|
|
578
|
+
redirects: {
|
|
579
|
+
useVueRouter: boolean;
|
|
580
|
+
redirectRoutes: RouteRecordRaw[];
|
|
581
|
+
};
|
|
565
582
|
}
|
|
566
583
|
interface Pkg {
|
|
567
584
|
name: string;
|
|
@@ -604,4 +621,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
|
|
|
604
621
|
*/
|
|
605
622
|
type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
606
623
|
|
|
607
|
-
export { type Album as A, 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 Post as a, type
|
|
624
|
+
export { type Album as A, 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 Post as a, type RedirectItem as b, type SiteConfig as c, type RuntimeConfig as d, type Pkg as e, type ValaxyConfig as f, type UserValaxyConfig as g, type Photo as h, type PageFrontMatter as i, type PostFrontMatter as j, type Page as k };
|
package/dist/node/cli/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVJXQXPVCcjs = require('../../chunk-VJXQXPVC.cjs');require('../../chunk-FNMRWIFM.cjs');exports.cli = _chunkVJXQXPVCcjs.M; exports.run = _chunkVJXQXPVCcjs.N;
|
package/dist/node/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{M as a,N as b}from"../../chunk-
|
|
2
|
+
import{M as a,N as b}from"../../chunk-UTVJER4P.mjs";import"../../chunk-R4WV6S3O.mjs";export{a as cli,b as run};
|
package/dist/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVJXQXPVCcjs = require('../chunk-VJXQXPVC.cjs');require('../chunk-FNMRWIFM.cjs');exports.build = _chunkVJXQXPVCcjs.H; exports.cli = _chunkVJXQXPVCcjs.M; exports.createServer = _chunkVJXQXPVCcjs.L; exports.defaultSiteConfig = _chunkVJXQXPVCcjs.k; exports.defaultValaxyConfig = _chunkVJXQXPVCcjs.o; exports.defineAddon = _chunkVJXQXPVCcjs.v; exports.defineConfig = _chunkVJXQXPVCcjs.q; exports.defineSiteConfig = _chunkVJXQXPVCcjs.l; exports.defineTheme = _chunkVJXQXPVCcjs.A; exports.defineUnoSetup = _chunkVJXQXPVCcjs.B; exports.defineValaxyAddon = _chunkVJXQXPVCcjs.u; exports.defineValaxyConfig = _chunkVJXQXPVCcjs.p; exports.defineValaxyTheme = _chunkVJXQXPVCcjs.z; exports.ensurePrefix = _chunkVJXQXPVCcjs.e; exports.generateClientRedirects = _chunkVJXQXPVCcjs.K; exports.getGitTimestamp = _chunkVJXQXPVCcjs.a; exports.getIndexHtml = _chunkVJXQXPVCcjs.G; exports.isExternal = _chunkVJXQXPVCcjs.c; exports.isPath = _chunkVJXQXPVCcjs.g; exports.loadConfig = _chunkVJXQXPVCcjs.i; exports.loadConfigFromFile = _chunkVJXQXPVCcjs.j; exports.mergeValaxyConfig = _chunkVJXQXPVCcjs.s; exports.mergeViteConfigs = _chunkVJXQXPVCcjs.F; exports.postProcessForSSG = _chunkVJXQXPVCcjs.J; exports.processValaxyOptions = _chunkVJXQXPVCcjs.C; exports.resolveAddonConfig = _chunkVJXQXPVCcjs.w; exports.resolveImportPath = _chunkVJXQXPVCcjs.b; exports.resolveOptions = _chunkVJXQXPVCcjs.D; exports.resolveSiteConfig = _chunkVJXQXPVCcjs.n; exports.resolveSiteConfigFromRoot = _chunkVJXQXPVCcjs.m; exports.resolveThemeConfigFromRoot = _chunkVJXQXPVCcjs.x; exports.resolveThemeValaxyConfig = _chunkVJXQXPVCcjs.E; exports.resolveUserThemeConfig = _chunkVJXQXPVCcjs.y; exports.resolveValaxyConfig = _chunkVJXQXPVCcjs.t; exports.resolveValaxyConfigFromRoot = _chunkVJXQXPVCcjs.r; exports.run = _chunkVJXQXPVCcjs.N; exports.slash = _chunkVJXQXPVCcjs.d; exports.ssgBuild = _chunkVJXQXPVCcjs.I; exports.toAtFS = _chunkVJXQXPVCcjs.f; exports.transformObject = _chunkVJXQXPVCcjs.h;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ export { cli, run } from './cli/index.cjs';
|
|
|
3
3
|
import * as vite from 'vite';
|
|
4
4
|
import { UserConfig, InlineConfig } from 'vite';
|
|
5
5
|
import * as valaxy_types from 'valaxy/types';
|
|
6
|
-
import { DefaultTheme, ValaxyConfig, PartialDeep, ValaxyAddon, RuntimeConfig, SiteConfig, UserSiteConfig } from 'valaxy/types';
|
|
6
|
+
import { DefaultTheme, ValaxyConfig, PartialDeep, ValaxyAddon, RuntimeConfig, RedirectItem, SiteConfig, UserSiteConfig } from 'valaxy/types';
|
|
7
7
|
import Vue from '@vitejs/plugin-vue';
|
|
8
8
|
import Components from 'unplugin-vue-components/vite';
|
|
9
9
|
import Layouts from 'vite-plugin-vue-layouts';
|
|
@@ -23,11 +23,12 @@ import { TocPluginOptions } from '@mdit-vue/plugin-toc';
|
|
|
23
23
|
import { ComponentPluginOptions } from '@mdit-vue/plugin-component';
|
|
24
24
|
import { Awaitable } from '@antfu/utils';
|
|
25
25
|
import * as defu from 'defu';
|
|
26
|
-
import { P as PartialDeep$1 } from '../config-
|
|
26
|
+
import { P as PartialDeep$1 } from '../config-hM2lXH4J.cjs';
|
|
27
27
|
import 'yargs';
|
|
28
28
|
import 'medium-zoom';
|
|
29
29
|
import '@vueuse/integrations/useFuse';
|
|
30
30
|
import 'vanilla-lazyload';
|
|
31
|
+
import 'vue-router';
|
|
31
32
|
import '@unhead/schema-org';
|
|
32
33
|
|
|
33
34
|
declare module 'vite' {
|
|
@@ -198,6 +199,10 @@ interface ValaxyExtendConfig {
|
|
|
198
199
|
katex: boolean;
|
|
199
200
|
};
|
|
200
201
|
vite?: UserConfig;
|
|
202
|
+
/**
|
|
203
|
+
* @vitejs/plugin-vue options
|
|
204
|
+
* @see https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md
|
|
205
|
+
*/
|
|
201
206
|
vue?: Parameters<typeof Vue>[0];
|
|
202
207
|
components?: Parameters<typeof Components>[0];
|
|
203
208
|
layouts?: Parameters<typeof Layouts>[0];
|
|
@@ -310,6 +315,10 @@ interface ResolvedValaxyOptions<ThemeConfig = DefaultTheme.Config> {
|
|
|
310
315
|
* Record<package-name, OptionResolver>
|
|
311
316
|
*/
|
|
312
317
|
addons: ValaxyAddonResolver[];
|
|
318
|
+
/**
|
|
319
|
+
* Collect redirect rule
|
|
320
|
+
*/
|
|
321
|
+
redirects: RedirectItem[];
|
|
313
322
|
}
|
|
314
323
|
interface ValaxyServerOptions {
|
|
315
324
|
onConfigReload?: (newConfig: ValaxyNodeConfig, config: ValaxyNodeConfig, force?: boolean) => void;
|
package/dist/node/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { cli, run } from './cli/index.js';
|
|
|
3
3
|
import * as vite from 'vite';
|
|
4
4
|
import { UserConfig, InlineConfig } from 'vite';
|
|
5
5
|
import * as valaxy_types from 'valaxy/types';
|
|
6
|
-
import { DefaultTheme, ValaxyConfig, PartialDeep, ValaxyAddon, RuntimeConfig, SiteConfig, UserSiteConfig } from 'valaxy/types';
|
|
6
|
+
import { DefaultTheme, ValaxyConfig, PartialDeep, ValaxyAddon, RuntimeConfig, RedirectItem, SiteConfig, UserSiteConfig } from 'valaxy/types';
|
|
7
7
|
import Vue from '@vitejs/plugin-vue';
|
|
8
8
|
import Components from 'unplugin-vue-components/vite';
|
|
9
9
|
import Layouts from 'vite-plugin-vue-layouts';
|
|
@@ -23,11 +23,12 @@ import { TocPluginOptions } from '@mdit-vue/plugin-toc';
|
|
|
23
23
|
import { ComponentPluginOptions } from '@mdit-vue/plugin-component';
|
|
24
24
|
import { Awaitable } from '@antfu/utils';
|
|
25
25
|
import * as defu from 'defu';
|
|
26
|
-
import { P as PartialDeep$1 } from '../config-
|
|
26
|
+
import { P as PartialDeep$1 } from '../config-hM2lXH4J.js';
|
|
27
27
|
import 'yargs';
|
|
28
28
|
import 'medium-zoom';
|
|
29
29
|
import '@vueuse/integrations/useFuse';
|
|
30
30
|
import 'vanilla-lazyload';
|
|
31
|
+
import 'vue-router';
|
|
31
32
|
import '@unhead/schema-org';
|
|
32
33
|
|
|
33
34
|
declare module 'vite' {
|
|
@@ -198,6 +199,10 @@ interface ValaxyExtendConfig {
|
|
|
198
199
|
katex: boolean;
|
|
199
200
|
};
|
|
200
201
|
vite?: UserConfig;
|
|
202
|
+
/**
|
|
203
|
+
* @vitejs/plugin-vue options
|
|
204
|
+
* @see https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md
|
|
205
|
+
*/
|
|
201
206
|
vue?: Parameters<typeof Vue>[0];
|
|
202
207
|
components?: Parameters<typeof Components>[0];
|
|
203
208
|
layouts?: Parameters<typeof Layouts>[0];
|
|
@@ -310,6 +315,10 @@ interface ResolvedValaxyOptions<ThemeConfig = DefaultTheme.Config> {
|
|
|
310
315
|
* Record<package-name, OptionResolver>
|
|
311
316
|
*/
|
|
312
317
|
addons: ValaxyAddonResolver[];
|
|
318
|
+
/**
|
|
319
|
+
* Collect redirect rule
|
|
320
|
+
*/
|
|
321
|
+
redirects: RedirectItem[];
|
|
313
322
|
}
|
|
314
323
|
interface ValaxyServerOptions {
|
|
315
324
|
onConfigReload?: (newConfig: ValaxyNodeConfig, config: ValaxyNodeConfig, force?: boolean) => void;
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-UTVJER4P.mjs";import"../chunk-R4WV6S3O.mjs";export{H as build,M as cli,L as createServer,k as defaultSiteConfig,o as defaultValaxyConfig,v as defineAddon,q as defineConfig,l as defineSiteConfig,A as defineTheme,B as defineUnoSetup,u as defineValaxyAddon,p as defineValaxyConfig,z as defineValaxyTheme,e as ensurePrefix,K as generateClientRedirects,a as getGitTimestamp,G as getIndexHtml,c as isExternal,g as isPath,i as loadConfig,j as loadConfigFromFile,s as mergeValaxyConfig,F as mergeViteConfigs,J as postProcessForSSG,C as processValaxyOptions,w as resolveAddonConfig,b as resolveImportPath,D as resolveOptions,n as resolveSiteConfig,m as resolveSiteConfigFromRoot,x as resolveThemeConfigFromRoot,E as resolveThemeValaxyConfig,y as resolveUserThemeConfig,t as resolveValaxyConfig,r as resolveValaxyConfigFromRoot,N as run,d as slash,I as ssgBuild,f as toAtFS,h as transformObject};
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as Post } from '../config-
|
|
2
|
-
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem,
|
|
1
|
+
import { a as Post } from '../config-hM2lXH4J.cjs';
|
|
2
|
+
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, k as Page, i as PageFrontMatter, P as PartialDeep, h as Photo, e as Pkg, j as PostFrontMatter, b as RedirectItem, R as RedirectRule, d as RuntimeConfig, c as SiteConfig, S as SocialLink, U as UserSiteConfig, g as UserValaxyConfig, V as ValaxyAddon, f as ValaxyConfig } from '../config-hM2lXH4J.cjs';
|
|
3
3
|
import 'medium-zoom';
|
|
4
4
|
import '@vueuse/integrations/useFuse';
|
|
5
5
|
import 'vanilla-lazyload';
|
|
6
|
+
import 'vue-router';
|
|
6
7
|
import '@unhead/schema-org';
|
|
7
8
|
|
|
8
9
|
type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as Post } from '../config-
|
|
2
|
-
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem,
|
|
1
|
+
import { a as Post } from '../config-hM2lXH4J.js';
|
|
2
|
+
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, k as Page, i as PageFrontMatter, P as PartialDeep, h as Photo, e as Pkg, j as PostFrontMatter, b as RedirectItem, R as RedirectRule, d as RuntimeConfig, c as SiteConfig, S as SocialLink, U as UserSiteConfig, g as UserValaxyConfig, V as ValaxyAddon, f as ValaxyConfig } from '../config-hM2lXH4J.js';
|
|
3
3
|
import 'medium-zoom';
|
|
4
4
|
import '@vueuse/integrations/useFuse';
|
|
5
5
|
import 'vanilla-lazyload';
|
|
6
|
+
import 'vue-router';
|
|
6
7
|
import '@unhead/schema-org';
|
|
7
8
|
|
|
8
9
|
type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.4",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@unhead/schema-org": "^1.8.10",
|
|
69
69
|
"@unhead/vue": "^1.8.10",
|
|
70
70
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
71
|
-
"@vue/devtools-api": "^7.0.
|
|
71
|
+
"@vue/devtools-api": "^7.0.14",
|
|
72
72
|
"@vueuse/core": "^10.7.2",
|
|
73
73
|
"@vueuse/integrations": "^10.7.2",
|
|
74
74
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
@@ -115,12 +115,12 @@
|
|
|
115
115
|
"unplugin-vue-router": "^0.7.0",
|
|
116
116
|
"vanilla-lazyload": "^17.8.5",
|
|
117
117
|
"vite": "^5.0.12",
|
|
118
|
-
"vite-plugin-vue-devtools": "^7.0.
|
|
118
|
+
"vite-plugin-vue-devtools": "^7.0.14",
|
|
119
119
|
"vite-plugin-vue-layouts": "0.11.0",
|
|
120
120
|
"vite-ssg": "0.23.6",
|
|
121
121
|
"vite-ssg-sitemap": "0.6.1",
|
|
122
122
|
"vue": "^3.4.15",
|
|
123
|
-
"vue-i18n": "^9.9.
|
|
123
|
+
"vue-i18n": "^9.9.1",
|
|
124
124
|
"vue-router": "^4.2.5",
|
|
125
125
|
"yargs": "^17.7.2",
|
|
126
126
|
"@valaxyjs/devtools": "0.0.1"
|
package/shims.d.ts
CHANGED
|
@@ -60,3 +60,11 @@ declare module 'vue-router' {
|
|
|
60
60
|
frontmatter: Post
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
declare module '/@valaxyjs/redirects' {
|
|
65
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
66
|
+
|
|
67
|
+
export const redirectRoutes: RouteRecordRaw[]
|
|
68
|
+
|
|
69
|
+
export const useVueRouter: boolean
|
|
70
|
+
}
|
package/types/config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ZoomOptions } from 'medium-zoom'
|
|
2
2
|
import type { FuseOptions } from '@vueuse/integrations/useFuse'
|
|
3
3
|
import type { ILazyLoadOptions } from 'vanilla-lazyload'
|
|
4
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
4
5
|
import type { ValaxyAddon } from '../types'
|
|
5
6
|
import type { DefaultTheme } from './default-theme'
|
|
6
7
|
import type { PostFrontMatter } from './posts'
|
|
@@ -27,6 +28,11 @@ export interface RedirectRule {
|
|
|
27
28
|
from: string | string[]
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
export interface RedirectItem {
|
|
32
|
+
from: string
|
|
33
|
+
to: string
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
// shared with valaxy node and client
|
|
31
37
|
export interface SiteConfig {
|
|
32
38
|
/**
|
|
@@ -323,7 +329,10 @@ export interface SiteConfig {
|
|
|
323
329
|
* @description:en-US client redirect rules
|
|
324
330
|
* @description:zh-CN 客户端重定向规则
|
|
325
331
|
*/
|
|
326
|
-
redirects?:
|
|
332
|
+
redirects?: {
|
|
333
|
+
useVueRouter?: boolean
|
|
334
|
+
rules?: RedirectRule[]
|
|
335
|
+
}
|
|
327
336
|
}
|
|
328
337
|
|
|
329
338
|
export type PartialDeep<T> = {
|
|
@@ -335,6 +344,10 @@ export type PartialDeep<T> = {
|
|
|
335
344
|
*/
|
|
336
345
|
export interface RuntimeConfig {
|
|
337
346
|
addons: Record<string, ValaxyAddon>
|
|
347
|
+
redirects: {
|
|
348
|
+
useVueRouter: boolean
|
|
349
|
+
redirectRoutes: RouteRecordRaw[]
|
|
350
|
+
}
|
|
338
351
|
}
|
|
339
352
|
|
|
340
353
|
export interface Pkg {
|
package/types/posts.ts
CHANGED
|
@@ -176,6 +176,11 @@ export interface PageFrontMatter extends Record<string, any> {
|
|
|
176
176
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
177
177
|
*/
|
|
178
178
|
codeHeightLimit?: number
|
|
179
|
+
/**
|
|
180
|
+
* @description:en-US Source path for client redirection
|
|
181
|
+
* @description:zh-CN 客户端重定向的源路径
|
|
182
|
+
*/
|
|
183
|
+
from?: string | string[]
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
export interface PostFrontMatter extends PageFrontMatter {
|