valaxy 0.25.9 → 0.25.10
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/dist/{chunk-MSK4KQXZ.js → chunk-JHXXCWZC.js} +4 -3
- package/dist/{config-CSOxBD5d.d.ts → config-bf4WqwPK.d.ts} +8 -0
- package/dist/node/cli/index.js +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +4 -4
- package/shared/utils/i18n.ts +1 -1
- package/types/config.ts +8 -0
|
@@ -4,7 +4,7 @@ import yargs from "yargs";
|
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.25.
|
|
7
|
+
var version = "0.25.10";
|
|
8
8
|
|
|
9
9
|
// node/modules/fuse.ts
|
|
10
10
|
import path4 from "path";
|
|
@@ -523,7 +523,7 @@ var EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i;
|
|
|
523
523
|
|
|
524
524
|
// shared/utils/i18n.ts
|
|
525
525
|
function tObject(data, lang) {
|
|
526
|
-
if (typeof data === "object") {
|
|
526
|
+
if (data && typeof data === "object") {
|
|
527
527
|
return data[lang] || Object.values(data)[0] || "";
|
|
528
528
|
}
|
|
529
529
|
return data;
|
|
@@ -900,7 +900,8 @@ async function isPagesDirExist(root) {
|
|
|
900
900
|
// node/modules/fuse.ts
|
|
901
901
|
async function generateFuseList(options) {
|
|
902
902
|
consola9.start(`Generate List for Fuse Search by (${colors7.cyan("fuse.js")}) ...`);
|
|
903
|
-
const
|
|
903
|
+
const pattern = options.config.siteConfig.fuse.pattern || path4.join(options.userRoot, "pages/**/*.md");
|
|
904
|
+
const files = await fg2(pattern);
|
|
904
905
|
const posts = [];
|
|
905
906
|
for await (const i of files) {
|
|
906
907
|
const raw = fs7.readFileSync(i, "utf-8");
|
|
@@ -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
|
*/
|
package/dist/node/cli/index.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/node/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as PostFrontMatter, d as PageFrontMatter } from '../config-
|
|
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-
|
|
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.
|
|
4
|
+
"version": "0.25.10",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"vite-plugin-vue-devtools": "^7.7.7",
|
|
126
126
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
127
127
|
"vite-ssg": "^28.0.0",
|
|
128
|
-
"vite-ssg-sitemap": "^0.
|
|
128
|
+
"vite-ssg-sitemap": "^0.10.0",
|
|
129
129
|
"vitepress-plugin-group-icons": "^1.6.1",
|
|
130
130
|
"vue": "^3.5.17",
|
|
131
131
|
"vue-i18n": "^11.1.10",
|
|
132
132
|
"vue-router": "^4.5.1",
|
|
133
133
|
"yargs": "^18.0.0",
|
|
134
|
-
"@valaxyjs/devtools": "0.25.
|
|
135
|
-
"@valaxyjs/utils": "0.25.
|
|
134
|
+
"@valaxyjs/devtools": "0.25.10",
|
|
135
|
+
"@valaxyjs/utils": "0.25.10"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@mdit-vue/plugin-component": "^2.1.4",
|
package/shared/utils/i18n.ts
CHANGED
|
@@ -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
|
*/
|