valaxy 0.20.1 → 0.20.3
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/components/ValaxyFootnoteTooltip.vue +12 -15
- package/client/composables/index.ts +1 -0
- package/client/composables/search/fuse.ts +57 -0
- package/client/composables/search/index.ts +1 -0
- package/client/modules/floating-vue.ts +3 -9
- package/client/stores/app.ts +11 -2
- package/dist/chunk-3BOTWUWT.cjs +161 -0
- package/dist/chunk-YHBMYDF7.mjs +162 -0
- package/dist/{config-DRImYfNf.d.cts → config-DfXD9Gt_.d.cts} +32 -4
- package/dist/{config-DRImYfNf.d.ts → config-DfXD9Gt_.d.ts} +32 -4
- 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 +73 -11
- package/dist/node/index.d.ts +73 -11
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/package.json +23 -21
- package/types/config.ts +31 -3
- package/types/node.ts +1 -1
- package/dist/chunk-G54Q6VIZ.mjs +0 -157
- package/dist/chunk-SHLDAAJY.cjs +0 -156
- /package/dist/{chunk-SWO32WYT.cjs → chunk-7EKNBB3E.cjs} +0 -0
- /package/dist/{chunk-FRSA4VPQ.mjs → chunk-AUDFAOQV.mjs} +0 -0
|
@@ -325,7 +325,7 @@ interface PostFrontMatter extends PageFrontMatter {
|
|
|
325
325
|
wordCount: string;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
interface FuseListItem {
|
|
328
|
+
interface FuseListItem extends Record<string, any> {
|
|
329
329
|
title: string;
|
|
330
330
|
excerpt?: string;
|
|
331
331
|
author: string;
|
|
@@ -377,6 +377,8 @@ interface SiteConfig {
|
|
|
377
377
|
/**
|
|
378
378
|
* alternative languages
|
|
379
379
|
* @description 可选语言
|
|
380
|
+
* @en If you want to disable multi-language support for your site, you can set this to only include one language (e.g. `['en']`)
|
|
381
|
+
* @zh 如果你想要禁言站点的多语言支持,可以将此项设置为仅包含一个语言 (例如 `['zh-CN']`)
|
|
380
382
|
* @default ['en', 'zh-CN']
|
|
381
383
|
* @see https://ogp.me/#optional
|
|
382
384
|
*/
|
|
@@ -465,9 +467,13 @@ interface SiteConfig {
|
|
|
465
467
|
*/
|
|
466
468
|
social: SocialLink[];
|
|
467
469
|
/**
|
|
468
|
-
* search
|
|
470
|
+
* @en search engine for your site
|
|
471
|
+
* @zh 搜索功能
|
|
469
472
|
*/
|
|
470
473
|
search: {
|
|
474
|
+
/**
|
|
475
|
+
* @zh 是否启用
|
|
476
|
+
*/
|
|
471
477
|
enable: boolean;
|
|
472
478
|
/**
|
|
473
479
|
* Search Type
|
|
@@ -495,8 +501,11 @@ interface SiteConfig {
|
|
|
495
501
|
*/
|
|
496
502
|
options: FuseOptions<FuseListItem> & {
|
|
497
503
|
/**
|
|
504
|
+
* @en_US The fields to be searched.
|
|
505
|
+
* @zh_CN 搜索的字段
|
|
498
506
|
* @default ['title', 'tags', 'categories', 'excerpt']
|
|
499
|
-
* @description
|
|
507
|
+
* @description:en-US List of keys that will be searched. This supports nested paths, weighted search, and searching in arrays of strings and objects
|
|
508
|
+
* @description:zh-CN 搜索将会涉及的字段列表,支持嵌套路径、加权搜索以及在字符串和对象数组中进行搜索
|
|
500
509
|
* @see https://fusejs.io/api/options.html#keys
|
|
501
510
|
*/
|
|
502
511
|
keys: FuseOptions<FuseListItem>['keys'];
|
|
@@ -518,6 +527,10 @@ interface SiteConfig {
|
|
|
518
527
|
* @default 'https://unpkg.com/'
|
|
519
528
|
*/
|
|
520
529
|
cdn: {
|
|
530
|
+
/**
|
|
531
|
+
* prefix for your third-party
|
|
532
|
+
* @default 'https://unpkg.com/'
|
|
533
|
+
*/
|
|
521
534
|
prefix: string;
|
|
522
535
|
};
|
|
523
536
|
/**
|
|
@@ -564,6 +577,9 @@ interface SiteConfig {
|
|
|
564
577
|
* @default undefined 不显示内容
|
|
565
578
|
*/
|
|
566
579
|
description?: string;
|
|
580
|
+
/**
|
|
581
|
+
* @zh 赞助方式
|
|
582
|
+
*/
|
|
567
583
|
methods: {
|
|
568
584
|
name: string;
|
|
569
585
|
url: string;
|
|
@@ -682,21 +698,33 @@ interface Pkg {
|
|
|
682
698
|
[key: string]: any;
|
|
683
699
|
}
|
|
684
700
|
interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
|
|
701
|
+
/**
|
|
702
|
+
* @en Site **info** config. This affects info displayed on the site, and is independent of themes.
|
|
703
|
+
* @zh 站点**信息**配置,这部分内容面向站点展示,且在不同主题中也是通用的格式
|
|
704
|
+
* @see [站点配置 | Valaxy](https://valaxy.site/guide/config#%E7%AB%99%E7%82%B9%E9%85%8D%E7%BD%AE)
|
|
705
|
+
* @see [Site Config | Valaxy](https://valaxy.site/guide/config#site-config)
|
|
706
|
+
*/
|
|
685
707
|
siteConfig: SiteConfig;
|
|
686
708
|
/**
|
|
687
709
|
* The name of theme
|
|
688
710
|
* @description 主题名称
|
|
711
|
+
* @see 主题橱窗 [Valaxy Themes Gallery](https://valaxy.site/themes/gallery)
|
|
712
|
+
* @see 如何编写主题? [How to write a theme? | Valaxy](https://valaxy.site/themes/write)
|
|
713
|
+
* @see [默认 Yun 主题示例](https://yun.valaxy.site/)
|
|
689
714
|
*/
|
|
690
715
|
theme: string;
|
|
691
716
|
/**
|
|
692
717
|
* The config of theme
|
|
718
|
+
* @zh 请参考对应主题的相关文档
|
|
693
719
|
* @description 主题配置
|
|
720
|
+
* @see [默认 Yun 主题文档](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-yun/docs/README.md)
|
|
694
721
|
*/
|
|
695
722
|
themeConfig: ThemeConfig & {
|
|
696
723
|
pkg: Pkg;
|
|
697
724
|
};
|
|
698
725
|
/**
|
|
699
|
-
*
|
|
726
|
+
* @en Generated in runtime, do not modify manually
|
|
727
|
+
* @zh 在运行时生成,请勿手动修改
|
|
700
728
|
*/
|
|
701
729
|
runtimeConfig: RuntimeConfig;
|
|
702
730
|
}
|
|
@@ -325,7 +325,7 @@ interface PostFrontMatter extends PageFrontMatter {
|
|
|
325
325
|
wordCount: string;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
interface FuseListItem {
|
|
328
|
+
interface FuseListItem extends Record<string, any> {
|
|
329
329
|
title: string;
|
|
330
330
|
excerpt?: string;
|
|
331
331
|
author: string;
|
|
@@ -377,6 +377,8 @@ interface SiteConfig {
|
|
|
377
377
|
/**
|
|
378
378
|
* alternative languages
|
|
379
379
|
* @description 可选语言
|
|
380
|
+
* @en If you want to disable multi-language support for your site, you can set this to only include one language (e.g. `['en']`)
|
|
381
|
+
* @zh 如果你想要禁言站点的多语言支持,可以将此项设置为仅包含一个语言 (例如 `['zh-CN']`)
|
|
380
382
|
* @default ['en', 'zh-CN']
|
|
381
383
|
* @see https://ogp.me/#optional
|
|
382
384
|
*/
|
|
@@ -465,9 +467,13 @@ interface SiteConfig {
|
|
|
465
467
|
*/
|
|
466
468
|
social: SocialLink[];
|
|
467
469
|
/**
|
|
468
|
-
* search
|
|
470
|
+
* @en search engine for your site
|
|
471
|
+
* @zh 搜索功能
|
|
469
472
|
*/
|
|
470
473
|
search: {
|
|
474
|
+
/**
|
|
475
|
+
* @zh 是否启用
|
|
476
|
+
*/
|
|
471
477
|
enable: boolean;
|
|
472
478
|
/**
|
|
473
479
|
* Search Type
|
|
@@ -495,8 +501,11 @@ interface SiteConfig {
|
|
|
495
501
|
*/
|
|
496
502
|
options: FuseOptions<FuseListItem> & {
|
|
497
503
|
/**
|
|
504
|
+
* @en_US The fields to be searched.
|
|
505
|
+
* @zh_CN 搜索的字段
|
|
498
506
|
* @default ['title', 'tags', 'categories', 'excerpt']
|
|
499
|
-
* @description
|
|
507
|
+
* @description:en-US List of keys that will be searched. This supports nested paths, weighted search, and searching in arrays of strings and objects
|
|
508
|
+
* @description:zh-CN 搜索将会涉及的字段列表,支持嵌套路径、加权搜索以及在字符串和对象数组中进行搜索
|
|
500
509
|
* @see https://fusejs.io/api/options.html#keys
|
|
501
510
|
*/
|
|
502
511
|
keys: FuseOptions<FuseListItem>['keys'];
|
|
@@ -518,6 +527,10 @@ interface SiteConfig {
|
|
|
518
527
|
* @default 'https://unpkg.com/'
|
|
519
528
|
*/
|
|
520
529
|
cdn: {
|
|
530
|
+
/**
|
|
531
|
+
* prefix for your third-party
|
|
532
|
+
* @default 'https://unpkg.com/'
|
|
533
|
+
*/
|
|
521
534
|
prefix: string;
|
|
522
535
|
};
|
|
523
536
|
/**
|
|
@@ -564,6 +577,9 @@ interface SiteConfig {
|
|
|
564
577
|
* @default undefined 不显示内容
|
|
565
578
|
*/
|
|
566
579
|
description?: string;
|
|
580
|
+
/**
|
|
581
|
+
* @zh 赞助方式
|
|
582
|
+
*/
|
|
567
583
|
methods: {
|
|
568
584
|
name: string;
|
|
569
585
|
url: string;
|
|
@@ -682,21 +698,33 @@ interface Pkg {
|
|
|
682
698
|
[key: string]: any;
|
|
683
699
|
}
|
|
684
700
|
interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
|
|
701
|
+
/**
|
|
702
|
+
* @en Site **info** config. This affects info displayed on the site, and is independent of themes.
|
|
703
|
+
* @zh 站点**信息**配置,这部分内容面向站点展示,且在不同主题中也是通用的格式
|
|
704
|
+
* @see [站点配置 | Valaxy](https://valaxy.site/guide/config#%E7%AB%99%E7%82%B9%E9%85%8D%E7%BD%AE)
|
|
705
|
+
* @see [Site Config | Valaxy](https://valaxy.site/guide/config#site-config)
|
|
706
|
+
*/
|
|
685
707
|
siteConfig: SiteConfig;
|
|
686
708
|
/**
|
|
687
709
|
* The name of theme
|
|
688
710
|
* @description 主题名称
|
|
711
|
+
* @see 主题橱窗 [Valaxy Themes Gallery](https://valaxy.site/themes/gallery)
|
|
712
|
+
* @see 如何编写主题? [How to write a theme? | Valaxy](https://valaxy.site/themes/write)
|
|
713
|
+
* @see [默认 Yun 主题示例](https://yun.valaxy.site/)
|
|
689
714
|
*/
|
|
690
715
|
theme: string;
|
|
691
716
|
/**
|
|
692
717
|
* The config of theme
|
|
718
|
+
* @zh 请参考对应主题的相关文档
|
|
693
719
|
* @description 主题配置
|
|
720
|
+
* @see [默认 Yun 主题文档](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-yun/docs/README.md)
|
|
694
721
|
*/
|
|
695
722
|
themeConfig: ThemeConfig & {
|
|
696
723
|
pkg: Pkg;
|
|
697
724
|
};
|
|
698
725
|
/**
|
|
699
|
-
*
|
|
726
|
+
* @en Generated in runtime, do not modify manually
|
|
727
|
+
* @zh 在运行时生成,请勿手动修改
|
|
700
728
|
*/
|
|
701
729
|
runtimeConfig: RuntimeConfig;
|
|
702
730
|
}
|
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 _chunk3BOTWUWTcjs = require('../../chunk-3BOTWUWT.cjs');require('../../chunk-7EKNBB3E.cjs');exports.cli = _chunk3BOTWUWTcjs.V; exports.run = _chunk3BOTWUWTcjs.W;
|
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{V as a,W as b}from"../../chunk-
|
|
2
|
+
import{V as a,W as b}from"../../chunk-YHBMYDF7.mjs";import"../../chunk-AUDFAOQV.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 _chunk3BOTWUWTcjs = require('../chunk-3BOTWUWT.cjs');require('../chunk-7EKNBB3E.cjs');exports.ALL_ROUTE = _chunk3BOTWUWTcjs.g; exports.EXCERPT_SEPARATOR = _chunk3BOTWUWTcjs.d; exports.EXTERNAL_URL_RE = _chunk3BOTWUWTcjs.e; exports.PATHNAME_PROTOCOL_RE = _chunk3BOTWUWTcjs.f; exports.ViteValaxyPlugins = _chunk3BOTWUWTcjs.P; exports.build = _chunk3BOTWUWTcjs.Q; exports.cli = _chunk3BOTWUWTcjs.V; exports.createServer = _chunk3BOTWUWTcjs.U; exports.createValaxyLoader = _chunk3BOTWUWTcjs.O; exports.customElements = _chunk3BOTWUWTcjs.h; exports.defaultSiteConfig = _chunk3BOTWUWTcjs.r; exports.defaultValaxyConfig = _chunk3BOTWUWTcjs.v; exports.defaultViteConfig = _chunk3BOTWUWTcjs.i; exports.defineAddon = _chunk3BOTWUWTcjs.C; exports.defineConfig = _chunk3BOTWUWTcjs.x; exports.defineSiteConfig = _chunk3BOTWUWTcjs.s; exports.defineTheme = _chunk3BOTWUWTcjs.H; exports.defineUnoSetup = _chunk3BOTWUWTcjs.I; exports.defineValaxyAddon = _chunk3BOTWUWTcjs.B; exports.defineValaxyConfig = _chunk3BOTWUWTcjs.w; exports.defineValaxyTheme = _chunk3BOTWUWTcjs.G; exports.ensurePrefix = _chunk3BOTWUWTcjs.l; exports.generateClientRedirects = _chunk3BOTWUWTcjs.T; exports.getGitTimestamp = _chunk3BOTWUWTcjs.a; exports.getIndexHtml = _chunk3BOTWUWTcjs.N; exports.isExternal = _chunk3BOTWUWTcjs.j; exports.isInstalledGlobally = _chunk3BOTWUWTcjs.b; exports.isPath = _chunk3BOTWUWTcjs.n; exports.loadConfig = _chunk3BOTWUWTcjs.p; exports.loadConfigFromFile = _chunk3BOTWUWTcjs.q; exports.mergeValaxyConfig = _chunk3BOTWUWTcjs.z; exports.mergeViteConfigs = _chunk3BOTWUWTcjs.M; exports.postProcessForSSG = _chunk3BOTWUWTcjs.S; exports.processValaxyOptions = _chunk3BOTWUWTcjs.J; exports.resolveAddonsConfig = _chunk3BOTWUWTcjs.D; exports.resolveImportPath = _chunk3BOTWUWTcjs.c; exports.resolveOptions = _chunk3BOTWUWTcjs.K; exports.resolveSiteConfig = _chunk3BOTWUWTcjs.u; exports.resolveSiteConfigFromRoot = _chunk3BOTWUWTcjs.t; exports.resolveThemeConfigFromRoot = _chunk3BOTWUWTcjs.E; exports.resolveThemeValaxyConfig = _chunk3BOTWUWTcjs.L; exports.resolveUserThemeConfig = _chunk3BOTWUWTcjs.F; exports.resolveValaxyConfig = _chunk3BOTWUWTcjs.A; exports.resolveValaxyConfigFromRoot = _chunk3BOTWUWTcjs.y; exports.run = _chunk3BOTWUWTcjs.W; exports.slash = _chunk3BOTWUWTcjs.k; exports.ssgBuild = _chunk3BOTWUWTcjs.R; exports.toAtFS = _chunk3BOTWUWTcjs.m; exports.transformObject = _chunk3BOTWUWTcjs.o;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -24,7 +24,7 @@ import { SfcPluginOptions } from '@mdit-vue/plugin-sfc';
|
|
|
24
24
|
import { TocPluginOptions } from '@mdit-vue/plugin-toc';
|
|
25
25
|
import { Awaitable } from '@antfu/utils';
|
|
26
26
|
import * as defu from 'defu';
|
|
27
|
-
import { P as PartialDeep$1 } from '../config-
|
|
27
|
+
import { P as PartialDeep$1 } from '../config-DfXD9Gt_.cjs';
|
|
28
28
|
import 'yargs';
|
|
29
29
|
import 'medium-zoom';
|
|
30
30
|
import '@vueuse/integrations/useFuse';
|
|
@@ -98,13 +98,14 @@ interface MarkdownOptions {
|
|
|
98
98
|
*
|
|
99
99
|
* You can also pass an object with `light` and `dark` themes to support dual themes.
|
|
100
100
|
*
|
|
101
|
-
* @
|
|
102
|
-
* @
|
|
101
|
+
* @see You can use an existing theme. https://shiki.style/themes
|
|
102
|
+
* @see Or add your own theme. https://shiki.style/guide/load-theme
|
|
103
103
|
*
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
106
|
-
*
|
|
107
|
-
*
|
|
104
|
+
* @example { theme: 'github-dark' }
|
|
105
|
+
* @example light and dark themes
|
|
106
|
+
* ```js
|
|
107
|
+
* { theme: { light: 'github-light', dark: 'github-dark' } }
|
|
108
|
+
* ```
|
|
108
109
|
*/
|
|
109
110
|
theme?: ThemeOptions;
|
|
110
111
|
/**
|
|
@@ -209,18 +210,21 @@ interface ValaxyExtendConfig {
|
|
|
209
210
|
* @deprecated use `build.ignoreDeadLinks` instead
|
|
210
211
|
*/
|
|
211
212
|
ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
|
|
213
|
+
/**
|
|
214
|
+
* options for `valaxy build`
|
|
215
|
+
*/
|
|
212
216
|
build: {
|
|
213
217
|
/**
|
|
214
218
|
* Don't fail builds due to dead links.
|
|
215
|
-
*
|
|
219
|
+
* @zh 忽略死链
|
|
216
220
|
* @default false
|
|
217
221
|
*/
|
|
218
222
|
ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
|
|
219
223
|
/**
|
|
220
224
|
* Enable SSG for pagination
|
|
225
|
+
* @en When enabled, it will generate pagination pages for you. `/page/1`, `/page/2`, ...
|
|
226
|
+
* @zh 启用 SSG 分页,将单独构建分页页面 `/page/1`, `/page/2`, ...
|
|
221
227
|
* @default false
|
|
222
|
-
* When enabled, it will generate pagination pages for you.
|
|
223
|
-
* `/page/1`, `/page/2`, ...
|
|
224
228
|
*/
|
|
225
229
|
ssgForPagination: boolean;
|
|
226
230
|
};
|
|
@@ -258,9 +262,15 @@ interface ValaxyExtendConfig {
|
|
|
258
262
|
features: {
|
|
259
263
|
/**
|
|
260
264
|
* enable katex for global
|
|
265
|
+
* @see [Example | Valaxy](https://valaxy.site/examples/katex)
|
|
266
|
+
* @see https://katex.org/
|
|
261
267
|
*/
|
|
262
268
|
katex: boolean;
|
|
263
269
|
};
|
|
270
|
+
/**
|
|
271
|
+
* vite.config.ts options
|
|
272
|
+
* @see https://vite.dev/
|
|
273
|
+
*/
|
|
264
274
|
vite?: UserConfig;
|
|
265
275
|
/**
|
|
266
276
|
* @vitejs/plugin-vue options
|
|
@@ -269,9 +279,21 @@ interface ValaxyExtendConfig {
|
|
|
269
279
|
vue?: Parameters<typeof Vue>[0] & {
|
|
270
280
|
isCustomElement?: ((tag: string) => boolean)[];
|
|
271
281
|
};
|
|
282
|
+
/**
|
|
283
|
+
* @see https://github.com/unplugin/unplugin-vue-components
|
|
284
|
+
*/
|
|
272
285
|
components?: Parameters<typeof Components>[0];
|
|
286
|
+
/**
|
|
287
|
+
* @see https://github.com/JohnCampionJr/vite-plugin-vue-layouts
|
|
288
|
+
*/
|
|
273
289
|
layouts?: Parameters<typeof Layouts>[0];
|
|
290
|
+
/**
|
|
291
|
+
* @see https://github.com/posva/unplugin-vue-router
|
|
292
|
+
*/
|
|
274
293
|
router?: Parameters<typeof Router>[0];
|
|
294
|
+
/**
|
|
295
|
+
* @see https://unocss.dev/config/
|
|
296
|
+
*/
|
|
275
297
|
unocss?: VitePluginConfig;
|
|
276
298
|
/**
|
|
277
299
|
* rollup-plugin-visualizer
|
|
@@ -280,6 +302,7 @@ interface ValaxyExtendConfig {
|
|
|
280
302
|
visualizer?: PluginVisualizerOptions;
|
|
281
303
|
/**
|
|
282
304
|
* unocss presets
|
|
305
|
+
* @see https://unocss.dev/guide/presets
|
|
283
306
|
*/
|
|
284
307
|
unocssPresets?: {
|
|
285
308
|
uno?: Parameters<typeof presetUno>[0];
|
|
@@ -287,6 +310,16 @@ interface ValaxyExtendConfig {
|
|
|
287
310
|
icons?: Parameters<typeof presetIcons>[0];
|
|
288
311
|
typography?: Parameters<typeof presetTypography>[0];
|
|
289
312
|
};
|
|
313
|
+
fuse?: {
|
|
314
|
+
/**
|
|
315
|
+
* @en_US Extends the metadata fields returned by the search
|
|
316
|
+
* @zh_CN 扩展搜索返回的元数据字段
|
|
317
|
+
* @default []
|
|
318
|
+
* @description:en-US By default, returns the following fields: title, tags, categories, author, excerpt, link
|
|
319
|
+
* @description:zh-CN 默认返回以下字段:title、tags、categories、author、excerpt、link
|
|
320
|
+
*/
|
|
321
|
+
extendKeys?: string[];
|
|
322
|
+
};
|
|
290
323
|
/**
|
|
291
324
|
* @experimental
|
|
292
325
|
* Enable Vue Devtools & Valaxy Devtools
|
|
@@ -294,9 +327,15 @@ interface ValaxyExtendConfig {
|
|
|
294
327
|
*/
|
|
295
328
|
devtools?: boolean;
|
|
296
329
|
/**
|
|
297
|
-
* for markdown
|
|
330
|
+
* @en config for markdown (include markdown-it plugins)
|
|
331
|
+
* @zh markdown 相关配置
|
|
332
|
+
* {@link MarkdownOptions}
|
|
298
333
|
*/
|
|
299
334
|
markdown?: MarkdownOptions & Parameters<typeof Markdown>[0];
|
|
335
|
+
/**
|
|
336
|
+
* @en Extend markdown, you can modify the markdown content/excerpt
|
|
337
|
+
* @zh 扩展 markdown
|
|
338
|
+
*/
|
|
300
339
|
extendMd?: (ctx: {
|
|
301
340
|
route: EditableTreeNode;
|
|
302
341
|
data: Readonly<Record<string, any>>;
|
|
@@ -304,7 +343,30 @@ interface ValaxyExtendConfig {
|
|
|
304
343
|
excerpt?: string;
|
|
305
344
|
path: string;
|
|
306
345
|
}) => void;
|
|
346
|
+
/**
|
|
347
|
+
* @en Addons system
|
|
348
|
+
* @zh 插件系统
|
|
349
|
+
* @see 为什么需要插件? [Why Addon? | Valaxy](https://valaxy.site/addons/why)
|
|
350
|
+
* @see 插件橱窗 [Addons Gallery | Valaxy](https://valaxy.site/addons/gallery)
|
|
351
|
+
* @example
|
|
352
|
+
* ```ts
|
|
353
|
+
* import { defineValaxyConfig } from 'valaxy'
|
|
354
|
+
* import { addonTest } from 'valaxy-addon-test'
|
|
355
|
+
*
|
|
356
|
+
* export default defineValaxyConfig({
|
|
357
|
+
* addons: [
|
|
358
|
+
* // we always recommend to use function, so that you can pass options
|
|
359
|
+
* addonTest(),
|
|
360
|
+
* ]
|
|
361
|
+
* })
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
307
364
|
addons?: ValaxyAddons;
|
|
365
|
+
/**
|
|
366
|
+
* @en Hooks system, you can customize each stage of the lifecycle.
|
|
367
|
+
* @zh 钩子系统,你可以对生命周期的各个阶段进行定制。
|
|
368
|
+
* @see https://valaxy.site/guide/custom/hooks
|
|
369
|
+
*/
|
|
308
370
|
hooks?: Partial<ValaxyHooks>;
|
|
309
371
|
}
|
|
310
372
|
type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
|
package/dist/node/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { SfcPluginOptions } from '@mdit-vue/plugin-sfc';
|
|
|
24
24
|
import { TocPluginOptions } from '@mdit-vue/plugin-toc';
|
|
25
25
|
import { Awaitable } from '@antfu/utils';
|
|
26
26
|
import * as defu from 'defu';
|
|
27
|
-
import { P as PartialDeep$1 } from '../config-
|
|
27
|
+
import { P as PartialDeep$1 } from '../config-DfXD9Gt_.js';
|
|
28
28
|
import 'yargs';
|
|
29
29
|
import 'medium-zoom';
|
|
30
30
|
import '@vueuse/integrations/useFuse';
|
|
@@ -98,13 +98,14 @@ interface MarkdownOptions {
|
|
|
98
98
|
*
|
|
99
99
|
* You can also pass an object with `light` and `dark` themes to support dual themes.
|
|
100
100
|
*
|
|
101
|
-
* @
|
|
102
|
-
* @
|
|
101
|
+
* @see You can use an existing theme. https://shiki.style/themes
|
|
102
|
+
* @see Or add your own theme. https://shiki.style/guide/load-theme
|
|
103
103
|
*
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
106
|
-
*
|
|
107
|
-
*
|
|
104
|
+
* @example { theme: 'github-dark' }
|
|
105
|
+
* @example light and dark themes
|
|
106
|
+
* ```js
|
|
107
|
+
* { theme: { light: 'github-light', dark: 'github-dark' } }
|
|
108
|
+
* ```
|
|
108
109
|
*/
|
|
109
110
|
theme?: ThemeOptions;
|
|
110
111
|
/**
|
|
@@ -209,18 +210,21 @@ interface ValaxyExtendConfig {
|
|
|
209
210
|
* @deprecated use `build.ignoreDeadLinks` instead
|
|
210
211
|
*/
|
|
211
212
|
ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
|
|
213
|
+
/**
|
|
214
|
+
* options for `valaxy build`
|
|
215
|
+
*/
|
|
212
216
|
build: {
|
|
213
217
|
/**
|
|
214
218
|
* Don't fail builds due to dead links.
|
|
215
|
-
*
|
|
219
|
+
* @zh 忽略死链
|
|
216
220
|
* @default false
|
|
217
221
|
*/
|
|
218
222
|
ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
|
|
219
223
|
/**
|
|
220
224
|
* Enable SSG for pagination
|
|
225
|
+
* @en When enabled, it will generate pagination pages for you. `/page/1`, `/page/2`, ...
|
|
226
|
+
* @zh 启用 SSG 分页,将单独构建分页页面 `/page/1`, `/page/2`, ...
|
|
221
227
|
* @default false
|
|
222
|
-
* When enabled, it will generate pagination pages for you.
|
|
223
|
-
* `/page/1`, `/page/2`, ...
|
|
224
228
|
*/
|
|
225
229
|
ssgForPagination: boolean;
|
|
226
230
|
};
|
|
@@ -258,9 +262,15 @@ interface ValaxyExtendConfig {
|
|
|
258
262
|
features: {
|
|
259
263
|
/**
|
|
260
264
|
* enable katex for global
|
|
265
|
+
* @see [Example | Valaxy](https://valaxy.site/examples/katex)
|
|
266
|
+
* @see https://katex.org/
|
|
261
267
|
*/
|
|
262
268
|
katex: boolean;
|
|
263
269
|
};
|
|
270
|
+
/**
|
|
271
|
+
* vite.config.ts options
|
|
272
|
+
* @see https://vite.dev/
|
|
273
|
+
*/
|
|
264
274
|
vite?: UserConfig;
|
|
265
275
|
/**
|
|
266
276
|
* @vitejs/plugin-vue options
|
|
@@ -269,9 +279,21 @@ interface ValaxyExtendConfig {
|
|
|
269
279
|
vue?: Parameters<typeof Vue>[0] & {
|
|
270
280
|
isCustomElement?: ((tag: string) => boolean)[];
|
|
271
281
|
};
|
|
282
|
+
/**
|
|
283
|
+
* @see https://github.com/unplugin/unplugin-vue-components
|
|
284
|
+
*/
|
|
272
285
|
components?: Parameters<typeof Components>[0];
|
|
286
|
+
/**
|
|
287
|
+
* @see https://github.com/JohnCampionJr/vite-plugin-vue-layouts
|
|
288
|
+
*/
|
|
273
289
|
layouts?: Parameters<typeof Layouts>[0];
|
|
290
|
+
/**
|
|
291
|
+
* @see https://github.com/posva/unplugin-vue-router
|
|
292
|
+
*/
|
|
274
293
|
router?: Parameters<typeof Router>[0];
|
|
294
|
+
/**
|
|
295
|
+
* @see https://unocss.dev/config/
|
|
296
|
+
*/
|
|
275
297
|
unocss?: VitePluginConfig;
|
|
276
298
|
/**
|
|
277
299
|
* rollup-plugin-visualizer
|
|
@@ -280,6 +302,7 @@ interface ValaxyExtendConfig {
|
|
|
280
302
|
visualizer?: PluginVisualizerOptions;
|
|
281
303
|
/**
|
|
282
304
|
* unocss presets
|
|
305
|
+
* @see https://unocss.dev/guide/presets
|
|
283
306
|
*/
|
|
284
307
|
unocssPresets?: {
|
|
285
308
|
uno?: Parameters<typeof presetUno>[0];
|
|
@@ -287,6 +310,16 @@ interface ValaxyExtendConfig {
|
|
|
287
310
|
icons?: Parameters<typeof presetIcons>[0];
|
|
288
311
|
typography?: Parameters<typeof presetTypography>[0];
|
|
289
312
|
};
|
|
313
|
+
fuse?: {
|
|
314
|
+
/**
|
|
315
|
+
* @en_US Extends the metadata fields returned by the search
|
|
316
|
+
* @zh_CN 扩展搜索返回的元数据字段
|
|
317
|
+
* @default []
|
|
318
|
+
* @description:en-US By default, returns the following fields: title, tags, categories, author, excerpt, link
|
|
319
|
+
* @description:zh-CN 默认返回以下字段:title、tags、categories、author、excerpt、link
|
|
320
|
+
*/
|
|
321
|
+
extendKeys?: string[];
|
|
322
|
+
};
|
|
290
323
|
/**
|
|
291
324
|
* @experimental
|
|
292
325
|
* Enable Vue Devtools & Valaxy Devtools
|
|
@@ -294,9 +327,15 @@ interface ValaxyExtendConfig {
|
|
|
294
327
|
*/
|
|
295
328
|
devtools?: boolean;
|
|
296
329
|
/**
|
|
297
|
-
* for markdown
|
|
330
|
+
* @en config for markdown (include markdown-it plugins)
|
|
331
|
+
* @zh markdown 相关配置
|
|
332
|
+
* {@link MarkdownOptions}
|
|
298
333
|
*/
|
|
299
334
|
markdown?: MarkdownOptions & Parameters<typeof Markdown>[0];
|
|
335
|
+
/**
|
|
336
|
+
* @en Extend markdown, you can modify the markdown content/excerpt
|
|
337
|
+
* @zh 扩展 markdown
|
|
338
|
+
*/
|
|
300
339
|
extendMd?: (ctx: {
|
|
301
340
|
route: EditableTreeNode;
|
|
302
341
|
data: Readonly<Record<string, any>>;
|
|
@@ -304,7 +343,30 @@ interface ValaxyExtendConfig {
|
|
|
304
343
|
excerpt?: string;
|
|
305
344
|
path: string;
|
|
306
345
|
}) => void;
|
|
346
|
+
/**
|
|
347
|
+
* @en Addons system
|
|
348
|
+
* @zh 插件系统
|
|
349
|
+
* @see 为什么需要插件? [Why Addon? | Valaxy](https://valaxy.site/addons/why)
|
|
350
|
+
* @see 插件橱窗 [Addons Gallery | Valaxy](https://valaxy.site/addons/gallery)
|
|
351
|
+
* @example
|
|
352
|
+
* ```ts
|
|
353
|
+
* import { defineValaxyConfig } from 'valaxy'
|
|
354
|
+
* import { addonTest } from 'valaxy-addon-test'
|
|
355
|
+
*
|
|
356
|
+
* export default defineValaxyConfig({
|
|
357
|
+
* addons: [
|
|
358
|
+
* // we always recommend to use function, so that you can pass options
|
|
359
|
+
* addonTest(),
|
|
360
|
+
* ]
|
|
361
|
+
* })
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
307
364
|
addons?: ValaxyAddons;
|
|
365
|
+
/**
|
|
366
|
+
* @en Hooks system, you can customize each stage of the lifecycle.
|
|
367
|
+
* @zh 钩子系统,你可以对生命周期的各个阶段进行定制。
|
|
368
|
+
* @see https://valaxy.site/guide/custom/hooks
|
|
369
|
+
*/
|
|
308
370
|
hooks?: Partial<ValaxyHooks>;
|
|
309
371
|
}
|
|
310
372
|
type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
|
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,O,P,Q,R,S,T,U,V,W,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,O,P,Q,R,S,T,U,V,W,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-YHBMYDF7.mjs";import"../chunk-AUDFAOQV.mjs";export{g as ALL_ROUTE,d as EXCERPT_SEPARATOR,e as EXTERNAL_URL_RE,f as PATHNAME_PROTOCOL_RE,P as ViteValaxyPlugins,Q as build,V as cli,U as createServer,O as createValaxyLoader,h as customElements,r as defaultSiteConfig,v as defaultValaxyConfig,i as defaultViteConfig,C as defineAddon,x as defineConfig,s as defineSiteConfig,H as defineTheme,I as defineUnoSetup,B as defineValaxyAddon,w as defineValaxyConfig,G as defineValaxyTheme,l as ensurePrefix,T as generateClientRedirects,a as getGitTimestamp,N as getIndexHtml,j as isExternal,b as isInstalledGlobally,n as isPath,p as loadConfig,q as loadConfigFromFile,z as mergeValaxyConfig,M as mergeViteConfigs,S as postProcessForSSG,J as processValaxyOptions,D as resolveAddonsConfig,c as resolveImportPath,K as resolveOptions,u as resolveSiteConfig,t as resolveSiteConfigFromRoot,E as resolveThemeConfigFromRoot,L as resolveThemeValaxyConfig,F as resolveUserThemeConfig,A as resolveValaxyConfig,y as resolveValaxyConfigFromRoot,W as run,k as slash,R as ssgBuild,m as toAtFS,o as transformObject};
|
package/dist/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var _chunk7EKNBB3Ecjs = require('../chunk-7EKNBB3E.cjs');_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );_chunk7EKNBB3Ecjs.e.call(void 0, );
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PageFrontMatter, b as PostFrontMatter } from '../config-
|
|
2
|
-
export { A as Album, 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-
|
|
1
|
+
import { a as PageFrontMatter, b as PostFrontMatter } from '../config-DfXD9Gt_.cjs';
|
|
2
|
+
export { A as Album, 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-DfXD9Gt_.cjs';
|
|
3
3
|
import { Header } from '@valaxyjs/utils';
|
|
4
4
|
import 'medium-zoom';
|
|
5
5
|
import '@vueuse/integrations/useFuse';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PageFrontMatter, b as PostFrontMatter } from '../config-
|
|
2
|
-
export { A as Album, 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-
|
|
1
|
+
import { a as PageFrontMatter, b as PostFrontMatter } from '../config-DfXD9Gt_.js';
|
|
2
|
+
export { A as Album, 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-DfXD9Gt_.js';
|
|
3
3
|
import { Header } from '@valaxyjs/utils';
|
|
4
4
|
import 'medium-zoom';
|
|
5
5
|
import '@vueuse/integrations/useFuse';
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{d as e}from"../chunk-
|
|
2
|
+
import{d as e}from"../chunk-AUDFAOQV.mjs";e();e();e();e();e();e();e();e();e();e();
|