valaxy 0.26.10 → 0.26.12
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/node/cli/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:process';
|
|
2
2
|
import 'yargs';
|
|
3
3
|
import 'yargs/helpers';
|
|
4
|
-
export { c as cli, d as registerDevCommand, r as run, a as startValaxyDev } from '../../shared/valaxy.
|
|
4
|
+
export { c as cli, d as registerDevCommand, r as run, a as startValaxyDev } from '../../shared/valaxy.DsB_W1aR.mjs';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'consola';
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, N as createServer, L as createValaxyPlugin, D as customElements, j as defaultSiteConfig, w as defaultValaxyConfig, F as defaultViteConfig, h as defineAddon, y as defineConfig, k as defineSiteConfig, u as defineTheme, f as defineValaxyAddon, x as defineValaxyConfig, t as defineValaxyTheme, O as encryptContent, g as generateClientRedirects, Q as getGitTimestamp, e as getIndexHtml, M as getServerInfoText, R as isExternal, U as isInstalledGlobally, S as isPath, v as loadConfigFromFile, A as mergeValaxyConfig, m as mergeViteConfigs, p as postProcessForSSG, I as processValaxyOptions, d as registerDevCommand, i as resolveAddonsConfig, Y as resolveImportPath, W as resolveImportUrl, J as resolveOptions, n as resolveSiteConfig, l as resolveSiteConfigFromRoot, o as resolveThemeConfigFromRoot, K as resolveThemeValaxyConfig, q as resolveUserThemeConfig, B as resolveValaxyConfig, z as resolveValaxyConfigFromRoot, r as run, s as ssgBuild, a as startValaxyDev, X as toAtFS, T as transformObject, H as version } from '../shared/valaxy.
|
|
1
|
+
export { C as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, N as createServer, L as createValaxyPlugin, D as customElements, j as defaultSiteConfig, w as defaultValaxyConfig, F as defaultViteConfig, h as defineAddon, y as defineConfig, k as defineSiteConfig, u as defineTheme, f as defineValaxyAddon, x as defineValaxyConfig, t as defineValaxyTheme, O as encryptContent, g as generateClientRedirects, Q as getGitTimestamp, e as getIndexHtml, M as getServerInfoText, R as isExternal, U as isInstalledGlobally, S as isPath, v as loadConfigFromFile, A as mergeValaxyConfig, m as mergeViteConfigs, p as postProcessForSSG, I as processValaxyOptions, d as registerDevCommand, i as resolveAddonsConfig, Y as resolveImportPath, W as resolveImportUrl, J as resolveOptions, n as resolveSiteConfig, l as resolveSiteConfigFromRoot, o as resolveThemeConfigFromRoot, K as resolveThemeValaxyConfig, q as resolveUserThemeConfig, B as resolveValaxyConfig, z as resolveValaxyConfigFromRoot, r as run, s as ssgBuild, a as startValaxyDev, X as toAtFS, T as transformObject, H as version } from '../shared/valaxy.DsB_W1aR.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'fs-extra';
|
|
4
4
|
import 'consola/utils';
|
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import yargs from 'yargs';
|
|
3
3
|
import { hideBin } from 'yargs/helpers';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import path$1, { join, dirname, resolve } from 'node:path';
|
|
5
|
+
import path$1, { join, dirname, resolve, relative as relative$1 } from 'node:path';
|
|
6
6
|
import { consola } from 'consola';
|
|
7
7
|
import { colors } from 'consola/utils';
|
|
8
8
|
import fg from 'fast-glob';
|
|
@@ -1599,7 +1599,7 @@ async function setupMarkdownPlugins(md, options, base = "/") {
|
|
|
1599
1599
|
return md;
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
-
const version = "0.26.
|
|
1602
|
+
const version = "0.26.12";
|
|
1603
1603
|
|
|
1604
1604
|
const GLOBAL_STATE = {
|
|
1605
1605
|
valaxyApp: void 0,
|
|
@@ -3902,21 +3902,36 @@ async function getPosts(params, options) {
|
|
|
3902
3902
|
const html = markdown.render(rssContent).replace('src="/', `src="${DOMAIN}/`);
|
|
3903
3903
|
if (data.image?.startsWith("/"))
|
|
3904
3904
|
data.image = DOMAIN + data.image;
|
|
3905
|
-
const
|
|
3905
|
+
const relativePath = relative$1(join(options.userRoot, "pages"), path);
|
|
3906
|
+
const urlPath = relativePath.replace(/\\/g, "/").replace(/\.md$/, "");
|
|
3907
|
+
const link = `${DOMAIN}/${urlPath}`;
|
|
3906
3908
|
const tip = `<br/><p>${lang === "zh-CN" ? `\u8BBF\u95EE <a href="${link}" target="_blank">${link}</a> ${fullText ? "\u67E5\u770B\u539F\u6587" : "\u9605\u8BFB\u5168\u6587"}\u3002` : `Visit <a href="${link}" target="_blank">${link}</a> to ${fullText ? "view original article" : "read more"}.`}</p>`;
|
|
3907
|
-
|
|
3909
|
+
const item = {
|
|
3908
3910
|
...data,
|
|
3909
3911
|
title: tObject(data.title, lang),
|
|
3910
3912
|
description: tObject(data.description, lang),
|
|
3911
3913
|
date: new Date(data.date),
|
|
3912
|
-
|
|
3914
|
+
// RSS pubDate / JSON date_published
|
|
3915
|
+
published: new Date(data.date),
|
|
3916
|
+
// Atom published (first publish time)
|
|
3913
3917
|
content: html + tip,
|
|
3914
3918
|
author: [author],
|
|
3915
3919
|
id: data.id || link,
|
|
3916
|
-
link
|
|
3917
|
-
|
|
3920
|
+
link,
|
|
3921
|
+
// Add updated field for Atom feed (if exists)
|
|
3922
|
+
// Atom: <updated> (last modified time)
|
|
3923
|
+
// JSON Feed: date_modified
|
|
3924
|
+
...data.updated && { updated: new Date(data.updated) }
|
|
3925
|
+
};
|
|
3926
|
+
posts.push(item);
|
|
3918
3927
|
}
|
|
3919
|
-
|
|
3928
|
+
const orderBy = siteConfig.orderBy || "date";
|
|
3929
|
+
const useUpdatedTime = orderBy === "updated";
|
|
3930
|
+
posts.sort((a, b) => {
|
|
3931
|
+
const aTime = useUpdatedTime ? a.updated || a.date : a.date;
|
|
3932
|
+
const bTime = useUpdatedTime ? b.updated || b.date : b.date;
|
|
3933
|
+
return +bTime - +aTime;
|
|
3934
|
+
});
|
|
3920
3935
|
return posts;
|
|
3921
3936
|
}
|
|
3922
3937
|
async function writeFeed(feedOptions, posts, options, feedNameMap) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.12",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"@antfu/utils": "^9.3.0",
|
|
65
65
|
"@clack/prompts": "^0.11.0",
|
|
66
66
|
"@iconify-json/ri": "^1.2.6",
|
|
67
|
-
"@intlify/unplugin-vue-i18n": "^11.0.
|
|
68
|
-
"@shikijs/transformers": "^3.
|
|
67
|
+
"@intlify/unplugin-vue-i18n": "^11.0.3",
|
|
68
|
+
"@shikijs/transformers": "^3.20.0",
|
|
69
69
|
"@types/katex": "^0.16.7",
|
|
70
|
-
"@unhead/addons": "^2.
|
|
71
|
-
"@unhead/schema-org": "^2.
|
|
72
|
-
"@unhead/vue": "^2.
|
|
73
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
70
|
+
"@unhead/addons": "^2.1.1",
|
|
71
|
+
"@unhead/schema-org": "^2.1.1",
|
|
72
|
+
"@unhead/vue": "^2.1.1",
|
|
73
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
74
74
|
"@vue/devtools-api": "7.7.2",
|
|
75
|
-
"@vueuse/core": "^14.
|
|
76
|
-
"@vueuse/integrations": "^14.
|
|
75
|
+
"@vueuse/core": "^14.1.0",
|
|
76
|
+
"@vueuse/integrations": "^14.1.0",
|
|
77
77
|
"beasties": "^0.3.5",
|
|
78
78
|
"consola": "^3.4.2",
|
|
79
79
|
"cross-spawn": "^7.0.6",
|
|
@@ -87,16 +87,16 @@
|
|
|
87
87
|
"fast-glob": "^3.3.3",
|
|
88
88
|
"feed": "^5.1.0",
|
|
89
89
|
"floating-vue": "^5.2.2",
|
|
90
|
-
"fs-extra": "^11.3.
|
|
90
|
+
"fs-extra": "^11.3.3",
|
|
91
91
|
"fuse.js": "^7.1.0",
|
|
92
92
|
"gray-matter": "^4.0.3",
|
|
93
|
-
"hookable": "^
|
|
93
|
+
"hookable": "^6.0.1",
|
|
94
94
|
"html-to-text": "^9.0.5",
|
|
95
95
|
"jiti": "^2.6.1",
|
|
96
96
|
"js-base64": "^3.7.8",
|
|
97
|
-
"js-yaml": "^4.1.
|
|
98
|
-
"katex": "^0.16.
|
|
99
|
-
"lru-cache": "^11.2.
|
|
97
|
+
"js-yaml": "^4.1.1",
|
|
98
|
+
"katex": "^0.16.27",
|
|
99
|
+
"lru-cache": "^11.2.4",
|
|
100
100
|
"markdown-it": "^14.1.0",
|
|
101
101
|
"markdown-it-anchor": "^9.2.0",
|
|
102
102
|
"markdown-it-async": "^2.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"markdown-it-table-of-contents": "^1.1.0",
|
|
109
109
|
"markdown-it-task-lists": "^2.1.1",
|
|
110
110
|
"medium-zoom": "^1.1.0",
|
|
111
|
-
"mermaid": "^11.12.
|
|
111
|
+
"mermaid": "^11.12.2",
|
|
112
112
|
"mlly": "^1.8.0",
|
|
113
113
|
"nprogress": "^0.2.0",
|
|
114
114
|
"open": "10.1.0",
|
|
@@ -118,29 +118,29 @@
|
|
|
118
118
|
"pinia": "^3.0.4",
|
|
119
119
|
"qrcode": "^1.5.4",
|
|
120
120
|
"resolve-global": "^2.0.0",
|
|
121
|
-
"sass": "^1.
|
|
122
|
-
"shiki": "^3.
|
|
121
|
+
"sass": "^1.97.1",
|
|
122
|
+
"shiki": "^3.20.0",
|
|
123
123
|
"star-markdown-css": "^0.5.3",
|
|
124
124
|
"table": "^6.9.0",
|
|
125
|
-
"unhead": "^2.
|
|
126
|
-
"unocss": "
|
|
125
|
+
"unhead": "^2.1.1",
|
|
126
|
+
"unocss": "66.5.10",
|
|
127
127
|
"unplugin-vue-components": "28.0.0",
|
|
128
128
|
"unplugin-vue-markdown": "^29.2.0",
|
|
129
|
-
"unplugin-vue-router": "^0.
|
|
129
|
+
"unplugin-vue-router": "^0.19.1",
|
|
130
130
|
"vanilla-lazyload": "^19.1.3",
|
|
131
|
-
"vite": "^7.
|
|
131
|
+
"vite": "^7.3.0",
|
|
132
132
|
"vite-dev-rpc": "^1.1.0",
|
|
133
|
-
"vite-plugin-vue-devtools": "^8.0.
|
|
133
|
+
"vite-plugin-vue-devtools": "^8.0.5",
|
|
134
134
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
135
135
|
"vite-ssg": "^28.2.2",
|
|
136
136
|
"vite-ssg-sitemap": "^0.10.0",
|
|
137
137
|
"vitepress-plugin-group-icons": "^1.6.5",
|
|
138
138
|
"vue": "3.5.22",
|
|
139
|
-
"vue-i18n": "^11.
|
|
140
|
-
"vue-router": "^4.6.
|
|
139
|
+
"vue-i18n": "^11.2.7",
|
|
140
|
+
"vue-router": "^4.6.4",
|
|
141
141
|
"yargs": "^18.0.0",
|
|
142
|
-
"@valaxyjs/devtools": "0.26.
|
|
143
|
-
"@valaxyjs/utils": "0.26.
|
|
142
|
+
"@valaxyjs/devtools": "0.26.12",
|
|
143
|
+
"@valaxyjs/utils": "0.26.12"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
146
|
"@mdit-vue/plugin-component": "^3.0.2",
|
|
@@ -160,12 +160,12 @@
|
|
|
160
160
|
"@types/nprogress": "^0.2.3",
|
|
161
161
|
"@types/pascalcase": "^1.0.3",
|
|
162
162
|
"@types/qrcode": "^1.5.6",
|
|
163
|
-
"@types/yargs": "^17.0.
|
|
163
|
+
"@types/yargs": "^17.0.35",
|
|
164
164
|
"cilicili": "^0.1.1",
|
|
165
165
|
"diacritics": "^1.3.0",
|
|
166
166
|
"gh-pages": "^6.3.0",
|
|
167
167
|
"https-localhost": "^4.7.1",
|
|
168
|
-
"p-map": "^7.0.
|
|
168
|
+
"p-map": "^7.0.4",
|
|
169
169
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
170
170
|
"unbuild": "^3.6.1"
|
|
171
171
|
},
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type augmentation for markdown-it-container
|
|
3
|
+
*
|
|
4
|
+
* The official @types/markdown-it-container@2.0.11 depends on @types/markdown-it@13.0.9,
|
|
5
|
+
* but we use @types/markdown-it@14.1.2. This file provides compatible type definitions.
|
|
6
|
+
*/
|
|
7
|
+
declare module 'markdown-it-container' {
|
|
8
|
+
import type MarkdownIt from 'markdown-it'
|
|
9
|
+
import type Token from 'markdown-it/lib/token.mjs'
|
|
10
|
+
|
|
11
|
+
interface ContainerOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Function to validate tail after opening marker, should return true on success.
|
|
14
|
+
*/
|
|
15
|
+
validate?: (params: string) => boolean
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Renderer for opening/closing tokens.
|
|
19
|
+
*/
|
|
20
|
+
render?: (tokens: Token[], idx: number, options: any, env: any, self: any) => string
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Character to use in delimiter, default is ":"
|
|
24
|
+
*/
|
|
25
|
+
marker?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* markdown-it plugin for creating block-level custom containers
|
|
30
|
+
*/
|
|
31
|
+
function container(
|
|
32
|
+
md: MarkdownIt,
|
|
33
|
+
name: string,
|
|
34
|
+
options?: ContainerOptions,
|
|
35
|
+
): void
|
|
36
|
+
|
|
37
|
+
export = container
|
|
38
|
+
}
|