valaxy 0.25.9 → 0.25.11

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.
@@ -566,6 +566,14 @@ interface SiteConfig {
566
566
  * @description 搜索结果列表数据所在路径
567
567
  */
568
568
  dataPath: string;
569
+ /**
570
+ * fast-glob pattern to match Fuse List Data
571
+ * @default `pages\/**\/*.md`
572
+ * ```ts
573
+ * await fg(`${userRoot}/pages/posts/**\/*.md`)
574
+ * ```
575
+ */
576
+ pattern?: string;
569
577
  /**
570
578
  * @see https://fusejs.io/api/options.html
571
579
  */
@@ -3,7 +3,7 @@ import {
3
3
  registerDevCommand,
4
4
  run,
5
5
  startValaxyDev
6
- } from "../../chunk-MSK4KQXZ.js";
6
+ } from "../../chunk-YYHL7OM3.js";
7
7
  export {
8
8
  cli,
9
9
  registerDevCommand,
@@ -2,7 +2,7 @@ import { ViteSSGOptions } from 'vite-ssg';
2
2
  import * as vite from 'vite';
3
3
  import { UserConfig, InlineConfig, 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-CSOxBD5d.js';
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';
6
6
  import Vue from '@vitejs/plugin-vue';
7
7
  import { Options as Options$2 } from 'beasties';
8
8
  import { Hookable } from 'hookable';
@@ -538,10 +538,6 @@ interface ResolvedConfig<T extends UserInputConfig = UserInputConfig> {
538
538
  config: T;
539
539
  configFile: string;
540
540
  }
541
- declare function loadConfig<T extends UserInputConfig = UserInputConfig>(options: {
542
- name: string;
543
- cwd: string;
544
- }): Promise<ResolvedConfig<T>>;
545
541
  declare function loadConfigFromFile<T extends UserInputConfig>(file: string, options?: LoadConfigFromFileOptions): Promise<ResolvedConfig<T>>;
546
542
 
547
543
  declare const defaultSiteConfig: SiteConfig;
@@ -686,4 +682,4 @@ declare function toAtFS(path: string): string;
686
682
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
687
683
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
688
684
 
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 };
685
+ 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, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
@@ -27,7 +27,6 @@ import {
27
27
  isExternal,
28
28
  isInstalledGlobally,
29
29
  isPath,
30
- loadConfig,
31
30
  loadConfigFromFile,
32
31
  mergeValaxyConfig,
33
32
  mergeViteConfigs,
@@ -50,7 +49,7 @@ import {
50
49
  startValaxyDev,
51
50
  toAtFS,
52
51
  transformObject
53
- } from "../chunk-MSK4KQXZ.js";
52
+ } from "../chunk-YYHL7OM3.js";
54
53
  export {
55
54
  $t,
56
55
  ALL_ROUTE,
@@ -80,7 +79,6 @@ export {
80
79
  isExternal,
81
80
  isInstalledGlobally,
82
81
  isPath,
83
- loadConfig,
84
82
  loadConfigFromFile,
85
83
  mergeValaxyConfig,
86
84
  mergeViteConfigs,
@@ -1,5 +1,5 @@
1
- import { c as PostFrontMatter, d as PageFrontMatter } from '../config-CSOxBD5d.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-CSOxBD5d.js';
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';
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.9",
4
+ "version": "0.25.11",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -73,6 +73,7 @@
73
73
  "css-i18n": "^0.0.5",
74
74
  "dayjs": "^1.11.13",
75
75
  "debug": "^4.4.1",
76
+ "define-config-ts": "^0.0.3",
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",
@@ -120,19 +121,19 @@
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
126
  "vite-plugin-vue-devtools": "^7.7.7",
126
127
  "vite-plugin-vue-layouts": "^0.11.0",
127
128
  "vite-ssg": "^28.0.0",
128
- "vite-ssg-sitemap": "^0.9.0",
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.9",
135
- "@valaxyjs/utils": "0.25.9"
135
+ "@valaxyjs/devtools": "0.25.11",
136
+ "@valaxyjs/utils": "0.25.11"
136
137
  },
137
138
  "devDependencies": {
138
139
  "@mdit-vue/plugin-component": "^2.1.4",
@@ -10,7 +10,7 @@
10
10
  * ```
11
11
  */
12
12
  export function tObject<T = string>(data: string | Record<string, T>, lang: string): T | string {
13
- if (typeof data === 'object') {
13
+ if (data && typeof data === 'object') {
14
14
  return data[lang] || Object.values(data)[0] || ''
15
15
  }
16
16
  return data
package/types/config.ts CHANGED
@@ -180,6 +180,14 @@ export interface SiteConfig {
180
180
  * @description 搜索结果列表数据所在路径
181
181
  */
182
182
  dataPath: string
183
+ /**
184
+ * fast-glob pattern to match Fuse List Data
185
+ * @default `pages\/**\/*.md`
186
+ * ```ts
187
+ * await fg(`${userRoot}/pages/posts/**\/*.md`)
188
+ * ```
189
+ */
190
+ pattern?: string
183
191
  /**
184
192
  * @see https://fusejs.io/api/options.html
185
193
  */