valaxy 0.20.0 → 0.20.2
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/ValaxyApp.vue +5 -35
- package/client/components/ValaxyFootnoteTooltip.vue +12 -15
- package/client/composables/app/index.ts +1 -0
- package/client/composables/app/useValaxyHead.ts +47 -0
- package/client/composables/index.ts +3 -0
- package/client/modules/floating-vue.ts +3 -9
- package/client/stores/app.ts +11 -2
- package/dist/chunk-LFH2U2WQ.cjs +154 -0
- package/dist/chunk-N5526RM3.mjs +155 -0
- package/dist/{config-DRImYfNf.d.cts → config-BXn7sQx8.d.cts} +6 -1
- package/dist/{config-DRImYfNf.d.ts → config-BXn7sQx8.d.ts} +6 -1
- 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 -13
- package/dist/node/index.d.ts +73 -13
- 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 +28 -27
- package/types/config.ts +6 -1
- package/dist/chunk-J3KURXZZ.cjs +0 -156
- package/dist/chunk-WLSTHI6Y.mjs +0 -157
- /package/dist/{chunk-D6FLLKWU.cjs → chunk-7EKNBB3E.cjs} +0 -0
- /package/dist/{chunk-KCYZWGKZ.mjs → chunk-AUDFAOQV.mjs} +0 -0
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 _chunkLFH2U2WQcjs = require('../../chunk-LFH2U2WQ.cjs');require('../../chunk-7EKNBB3E.cjs');exports.cli = _chunkLFH2U2WQcjs.V; exports.run = _chunkLFH2U2WQcjs.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{
|
|
2
|
+
import{V as a,W as b}from"../../chunk-N5526RM3.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 _chunkLFH2U2WQcjs = require('../chunk-LFH2U2WQ.cjs');require('../chunk-7EKNBB3E.cjs');exports.ALL_ROUTE = _chunkLFH2U2WQcjs.e; exports.EXCERPT_SEPARATOR = _chunkLFH2U2WQcjs.b; exports.EXTERNAL_URL_RE = _chunkLFH2U2WQcjs.c; exports.PATHNAME_PROTOCOL_RE = _chunkLFH2U2WQcjs.d; exports.ViteValaxyPlugins = _chunkLFH2U2WQcjs.P; exports.build = _chunkLFH2U2WQcjs.Q; exports.cli = _chunkLFH2U2WQcjs.V; exports.createServer = _chunkLFH2U2WQcjs.U; exports.createValaxyLoader = _chunkLFH2U2WQcjs.O; exports.customElements = _chunkLFH2U2WQcjs.f; exports.defaultSiteConfig = _chunkLFH2U2WQcjs.r; exports.defaultValaxyConfig = _chunkLFH2U2WQcjs.v; exports.defaultViteConfig = _chunkLFH2U2WQcjs.g; exports.defineAddon = _chunkLFH2U2WQcjs.C; exports.defineConfig = _chunkLFH2U2WQcjs.x; exports.defineSiteConfig = _chunkLFH2U2WQcjs.s; exports.defineTheme = _chunkLFH2U2WQcjs.H; exports.defineUnoSetup = _chunkLFH2U2WQcjs.I; exports.defineValaxyAddon = _chunkLFH2U2WQcjs.B; exports.defineValaxyConfig = _chunkLFH2U2WQcjs.w; exports.defineValaxyTheme = _chunkLFH2U2WQcjs.G; exports.ensurePrefix = _chunkLFH2U2WQcjs.l; exports.generateClientRedirects = _chunkLFH2U2WQcjs.T; exports.getGitTimestamp = _chunkLFH2U2WQcjs.a; exports.getIndexHtml = _chunkLFH2U2WQcjs.N; exports.isExternal = _chunkLFH2U2WQcjs.j; exports.isInstalledGlobally = _chunkLFH2U2WQcjs.h; exports.isPath = _chunkLFH2U2WQcjs.n; exports.loadConfig = _chunkLFH2U2WQcjs.p; exports.loadConfigFromFile = _chunkLFH2U2WQcjs.q; exports.mergeValaxyConfig = _chunkLFH2U2WQcjs.z; exports.mergeViteConfigs = _chunkLFH2U2WQcjs.M; exports.postProcessForSSG = _chunkLFH2U2WQcjs.S; exports.processValaxyOptions = _chunkLFH2U2WQcjs.J; exports.resolveAddonsConfig = _chunkLFH2U2WQcjs.D; exports.resolveImportPath = _chunkLFH2U2WQcjs.i; exports.resolveOptions = _chunkLFH2U2WQcjs.K; exports.resolveSiteConfig = _chunkLFH2U2WQcjs.u; exports.resolveSiteConfigFromRoot = _chunkLFH2U2WQcjs.t; exports.resolveThemeConfigFromRoot = _chunkLFH2U2WQcjs.E; exports.resolveThemeValaxyConfig = _chunkLFH2U2WQcjs.L; exports.resolveUserThemeConfig = _chunkLFH2U2WQcjs.F; exports.resolveValaxyConfig = _chunkLFH2U2WQcjs.A; exports.resolveValaxyConfigFromRoot = _chunkLFH2U2WQcjs.y; exports.run = _chunkLFH2U2WQcjs.W; exports.slash = _chunkLFH2U2WQcjs.k; exports.ssgBuild = _chunkLFH2U2WQcjs.R; exports.toAtFS = _chunkLFH2U2WQcjs.m; exports.transformObject = _chunkLFH2U2WQcjs.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-BXn7sQx8.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];
|
|
@@ -294,9 +317,15 @@ interface ValaxyExtendConfig {
|
|
|
294
317
|
*/
|
|
295
318
|
devtools?: boolean;
|
|
296
319
|
/**
|
|
297
|
-
* for markdown
|
|
320
|
+
* @en config for markdown (include markdown-it plugins)
|
|
321
|
+
* @zh markdown 相关配置
|
|
322
|
+
* {@link MarkdownOptions}
|
|
298
323
|
*/
|
|
299
324
|
markdown?: MarkdownOptions & Parameters<typeof Markdown>[0];
|
|
325
|
+
/**
|
|
326
|
+
* @en Extend markdown, you can modify the markdown content/excerpt
|
|
327
|
+
* @zh 扩展 markdown
|
|
328
|
+
*/
|
|
300
329
|
extendMd?: (ctx: {
|
|
301
330
|
route: EditableTreeNode;
|
|
302
331
|
data: Readonly<Record<string, any>>;
|
|
@@ -304,7 +333,30 @@ interface ValaxyExtendConfig {
|
|
|
304
333
|
excerpt?: string;
|
|
305
334
|
path: string;
|
|
306
335
|
}) => void;
|
|
336
|
+
/**
|
|
337
|
+
* @en Addons system
|
|
338
|
+
* @zh 插件系统
|
|
339
|
+
* @see 为什么需要插件? [Why Addon? | Valaxy](https://valaxy.site/addons/why)
|
|
340
|
+
* @see 插件橱窗 [Addons Gallery | Valaxy](https://valaxy.site/addons/gallery)
|
|
341
|
+
* @example
|
|
342
|
+
* ```ts
|
|
343
|
+
* import { defineValaxyConfig } from 'valaxy'
|
|
344
|
+
* import { addonTest } from 'valaxy-addon-test'
|
|
345
|
+
*
|
|
346
|
+
* export default defineValaxyConfig({
|
|
347
|
+
* addons: [
|
|
348
|
+
* // we always recommend to use function, so that you can pass options
|
|
349
|
+
* addonTest(),
|
|
350
|
+
* ]
|
|
351
|
+
* })
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
307
354
|
addons?: ValaxyAddons;
|
|
355
|
+
/**
|
|
356
|
+
* @en Hooks system, you can customize each stage of the lifecycle.
|
|
357
|
+
* @zh 钩子系统,你可以对生命周期的各个阶段进行定制。
|
|
358
|
+
* @see https://valaxy.site/guide/custom/hooks
|
|
359
|
+
*/
|
|
308
360
|
hooks?: Partial<ValaxyHooks>;
|
|
309
361
|
}
|
|
310
362
|
type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
|
|
@@ -555,7 +607,15 @@ declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig,
|
|
|
555
607
|
|
|
556
608
|
declare function getGitTimestamp(file: string, type?: 'created' | 'updated'): Promise<number>;
|
|
557
609
|
|
|
558
|
-
declare
|
|
610
|
+
declare const isInstalledGlobally: {
|
|
611
|
+
value?: boolean;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Before is CJS: use 'resolve'
|
|
615
|
+
* ESM: use 'mlly'
|
|
616
|
+
*/
|
|
617
|
+
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
618
|
+
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
559
619
|
|
|
560
620
|
/**
|
|
561
621
|
* is url external (http/https:)
|
|
@@ -576,4 +636,4 @@ declare function isPath(name: string): boolean;
|
|
|
576
636
|
*/
|
|
577
637
|
declare function transformObject(obj: any): string;
|
|
578
638
|
|
|
579
|
-
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
|
639
|
+
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
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-BXn7sQx8.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];
|
|
@@ -294,9 +317,15 @@ interface ValaxyExtendConfig {
|
|
|
294
317
|
*/
|
|
295
318
|
devtools?: boolean;
|
|
296
319
|
/**
|
|
297
|
-
* for markdown
|
|
320
|
+
* @en config for markdown (include markdown-it plugins)
|
|
321
|
+
* @zh markdown 相关配置
|
|
322
|
+
* {@link MarkdownOptions}
|
|
298
323
|
*/
|
|
299
324
|
markdown?: MarkdownOptions & Parameters<typeof Markdown>[0];
|
|
325
|
+
/**
|
|
326
|
+
* @en Extend markdown, you can modify the markdown content/excerpt
|
|
327
|
+
* @zh 扩展 markdown
|
|
328
|
+
*/
|
|
300
329
|
extendMd?: (ctx: {
|
|
301
330
|
route: EditableTreeNode;
|
|
302
331
|
data: Readonly<Record<string, any>>;
|
|
@@ -304,7 +333,30 @@ interface ValaxyExtendConfig {
|
|
|
304
333
|
excerpt?: string;
|
|
305
334
|
path: string;
|
|
306
335
|
}) => void;
|
|
336
|
+
/**
|
|
337
|
+
* @en Addons system
|
|
338
|
+
* @zh 插件系统
|
|
339
|
+
* @see 为什么需要插件? [Why Addon? | Valaxy](https://valaxy.site/addons/why)
|
|
340
|
+
* @see 插件橱窗 [Addons Gallery | Valaxy](https://valaxy.site/addons/gallery)
|
|
341
|
+
* @example
|
|
342
|
+
* ```ts
|
|
343
|
+
* import { defineValaxyConfig } from 'valaxy'
|
|
344
|
+
* import { addonTest } from 'valaxy-addon-test'
|
|
345
|
+
*
|
|
346
|
+
* export default defineValaxyConfig({
|
|
347
|
+
* addons: [
|
|
348
|
+
* // we always recommend to use function, so that you can pass options
|
|
349
|
+
* addonTest(),
|
|
350
|
+
* ]
|
|
351
|
+
* })
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
307
354
|
addons?: ValaxyAddons;
|
|
355
|
+
/**
|
|
356
|
+
* @en Hooks system, you can customize each stage of the lifecycle.
|
|
357
|
+
* @zh 钩子系统,你可以对生命周期的各个阶段进行定制。
|
|
358
|
+
* @see https://valaxy.site/guide/custom/hooks
|
|
359
|
+
*/
|
|
308
360
|
hooks?: Partial<ValaxyHooks>;
|
|
309
361
|
}
|
|
310
362
|
type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
|
|
@@ -555,7 +607,15 @@ declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig,
|
|
|
555
607
|
|
|
556
608
|
declare function getGitTimestamp(file: string, type?: 'created' | 'updated'): Promise<number>;
|
|
557
609
|
|
|
558
|
-
declare
|
|
610
|
+
declare const isInstalledGlobally: {
|
|
611
|
+
value?: boolean;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Before is CJS: use 'resolve'
|
|
615
|
+
* ESM: use 'mlly'
|
|
616
|
+
*/
|
|
617
|
+
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
618
|
+
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
559
619
|
|
|
560
620
|
/**
|
|
561
621
|
* is url external (http/https:)
|
|
@@ -576,4 +636,4 @@ declare function isPath(name: string): boolean;
|
|
|
576
636
|
*/
|
|
577
637
|
declare function transformObject(obj: any): string;
|
|
578
638
|
|
|
579
|
-
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
|
639
|
+
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
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,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-N5526RM3.mjs";import"../chunk-AUDFAOQV.mjs";export{e as ALL_ROUTE,b as EXCERPT_SEPARATOR,c as EXTERNAL_URL_RE,d as PATHNAME_PROTOCOL_RE,P as ViteValaxyPlugins,Q as build,V as cli,U as createServer,O as createValaxyLoader,f as customElements,r as defaultSiteConfig,v as defaultValaxyConfig,g 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,h 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,i 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-BXn7sQx8.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-BXn7sQx8.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-BXn7sQx8.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-BXn7sQx8.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();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.2",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -59,20 +59,20 @@
|
|
|
59
59
|
"@antfu/install-pkg": "^0.4.1",
|
|
60
60
|
"@antfu/utils": "^0.7.10",
|
|
61
61
|
"@clack/prompts": "^0.7.0",
|
|
62
|
-
"@iconify-json/ri": "^1.2.
|
|
62
|
+
"@iconify-json/ri": "^1.2.3",
|
|
63
63
|
"@intlify/unplugin-vue-i18n": "4",
|
|
64
64
|
"@types/katex": "^0.16.7",
|
|
65
65
|
"@types/luxon": "^3.4.2",
|
|
66
|
-
"@unhead/addons": "^1.11.
|
|
67
|
-
"@unhead/schema-org": "^1.11.
|
|
68
|
-
"@unhead/vue": "^1.11.
|
|
66
|
+
"@unhead/addons": "^1.11.11",
|
|
67
|
+
"@unhead/schema-org": "^1.11.11",
|
|
68
|
+
"@unhead/vue": "^1.11.11",
|
|
69
69
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
70
|
-
"@vue/devtools-api": "^7.
|
|
71
|
-
"@vueuse/core": "^11.
|
|
72
|
-
"@vueuse/integrations": "^11.
|
|
70
|
+
"@vue/devtools-api": "^7.6.3",
|
|
71
|
+
"@vueuse/core": "^11.2.0",
|
|
72
|
+
"@vueuse/integrations": "^11.2.0",
|
|
73
73
|
"consola": "^3.2.3",
|
|
74
74
|
"critters": "^0.0.25",
|
|
75
|
-
"cross-spawn": "^7.0.
|
|
75
|
+
"cross-spawn": "^7.0.5",
|
|
76
76
|
"css-i18n": "^0.0.5",
|
|
77
77
|
"date-fns": "^4.1.0",
|
|
78
78
|
"date-fns-tz": "^3.2.0",
|
|
@@ -87,12 +87,11 @@
|
|
|
87
87
|
"gray-matter": "^4.0.3",
|
|
88
88
|
"hookable": "^5.5.3",
|
|
89
89
|
"html-to-text": "^9.0.5",
|
|
90
|
-
"
|
|
91
|
-
"jiti": "^2.3.3",
|
|
90
|
+
"jiti": "^2.4.0",
|
|
92
91
|
"js-base64": "^3.7.7",
|
|
93
92
|
"js-yaml": "^4.1.0",
|
|
94
93
|
"katex": "^0.16.11",
|
|
95
|
-
"lru-cache": "^11.0.
|
|
94
|
+
"lru-cache": "^11.0.2",
|
|
96
95
|
"luxon": "^3.5.0",
|
|
97
96
|
"markdown-it": "^14.1.0",
|
|
98
97
|
"markdown-it-anchor": "^9.2.0",
|
|
@@ -104,33 +103,35 @@
|
|
|
104
103
|
"markdown-it-table-of-contents": "^0.8.0",
|
|
105
104
|
"markdown-it-task-lists": "^2.1.1",
|
|
106
105
|
"medium-zoom": "^1.1.0",
|
|
107
|
-
"mermaid": "^11.
|
|
106
|
+
"mermaid": "^11.4.0",
|
|
107
|
+
"mlly": "^1.7.2",
|
|
108
108
|
"nprogress": "^0.2.0",
|
|
109
109
|
"open": "10.1.0",
|
|
110
|
-
"ora": "^8.1.
|
|
110
|
+
"ora": "^8.1.1",
|
|
111
111
|
"pascalcase": "^2.0.0",
|
|
112
112
|
"pathe": "^1.1.2",
|
|
113
|
-
"pinia": "^2.2.
|
|
113
|
+
"pinia": "^2.2.6",
|
|
114
114
|
"qrcode": "^1.5.4",
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
115
|
+
"resolve-global": "^2.0.0",
|
|
116
|
+
"sass": "^1.80.6",
|
|
117
|
+
"shiki": "^1.22.2",
|
|
118
|
+
"star-markdown-css": "^0.5.3",
|
|
119
|
+
"unocss": "^0.64.0",
|
|
119
120
|
"unplugin-vue-components": "^0.27.4",
|
|
120
121
|
"unplugin-vue-markdown": "^0.26.2",
|
|
121
122
|
"unplugin-vue-router": "^0.10.8",
|
|
122
123
|
"vanilla-lazyload": "^19.1.3",
|
|
123
|
-
"vite": "^5.4.
|
|
124
|
-
"vite-plugin-vue-devtools": "^7.
|
|
125
|
-
"vite-plugin-vue-layouts": "0.11.0",
|
|
126
|
-
"vite-ssg": "0.
|
|
127
|
-
"vite-ssg-sitemap": "0.
|
|
128
|
-
"vue": "^3.5.
|
|
124
|
+
"vite": "^5.4.10",
|
|
125
|
+
"vite-plugin-vue-devtools": "^7.6.3",
|
|
126
|
+
"vite-plugin-vue-layouts": "^0.11.0",
|
|
127
|
+
"vite-ssg": "^0.24.1",
|
|
128
|
+
"vite-ssg-sitemap": "^0.8.1",
|
|
129
|
+
"vue": "^3.5.12",
|
|
129
130
|
"vue-i18n": "^10.0.4",
|
|
130
131
|
"vue-router": "^4.4.5",
|
|
131
132
|
"yargs": "^17.7.2",
|
|
132
|
-
"@valaxyjs/devtools": "0.20.
|
|
133
|
-
"@valaxyjs/utils": "0.20.
|
|
133
|
+
"@valaxyjs/devtools": "0.20.2",
|
|
134
|
+
"@valaxyjs/utils": "0.20.2"
|
|
134
135
|
},
|
|
135
136
|
"devDependencies": {
|
|
136
137
|
"@mdit-vue/plugin-component": "^2.1.3",
|
package/types/config.ts
CHANGED
|
@@ -55,6 +55,8 @@ export interface SiteConfig {
|
|
|
55
55
|
/**
|
|
56
56
|
* alternative languages
|
|
57
57
|
* @description 可选语言
|
|
58
|
+
* @en If you want to disable multi-language support for your site, you can set this to only include one language (e.g. `['en']`)
|
|
59
|
+
* @zh 如果你想要禁言站点的多语言支持,可以将此项设置为仅包含一个语言 (例如 `['zh-CN']`)
|
|
58
60
|
* @default ['en', 'zh-CN']
|
|
59
61
|
* @see https://ogp.me/#optional
|
|
60
62
|
*/
|
|
@@ -391,6 +393,8 @@ export interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
|
|
|
391
393
|
/**
|
|
392
394
|
* The name of theme
|
|
393
395
|
* @description 主题名称
|
|
396
|
+
* @see 主题橱窗 [Valaxy Themes Gallery](https://valaxy.site/themes/gallery)
|
|
397
|
+
* @see 如何编写主题? [How to write a theme? | Valaxy](https://valaxy.site/themes/write)
|
|
394
398
|
*/
|
|
395
399
|
theme: string
|
|
396
400
|
/**
|
|
@@ -401,7 +405,8 @@ export interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
|
|
|
401
405
|
pkg: Pkg
|
|
402
406
|
}
|
|
403
407
|
/**
|
|
404
|
-
*
|
|
408
|
+
* @en Generated in runtime, do not modify manually
|
|
409
|
+
* @zh 在运行时生成,请勿手动修改
|
|
405
410
|
*/
|
|
406
411
|
runtimeConfig: RuntimeConfig
|
|
407
412
|
}
|