@xingwangzhe/stalux 1.3.3 → 1.3.5
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingwangzhe/stalux",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "A powerful, modern Astro blog theme
|
|
3
|
+
"version": "1.3.5",
|
|
4
|
+
"description": "A powerful, modern Astro blog theme — use as template or install as plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
7
7
|
"astro-integration",
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"prepare": "git config core.hooksPath scripts/git-hooks"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
+
"@astrojs/sitemap": "^3.7.3",
|
|
75
76
|
"@expressive-code/plugin-line-numbers": "^0.44.1",
|
|
76
77
|
"@pagefind/component-ui": "^1.5.2",
|
|
77
78
|
"@waline/client": "3.15.2",
|
|
79
|
+
"@xingwangzhe/satteri-mermaid": "0.7.1",
|
|
80
|
+
"@xingwangzhe/satteri-photoswipe": "^0.2.0",
|
|
78
81
|
"@xingwangzhe/tags-cloud": "^1.2.4",
|
|
79
82
|
"animejs": "^4.5.0",
|
|
80
83
|
"astro": "^7.1.3",
|
|
84
|
+
"astro-expressive-code": "^0.44.1",
|
|
81
85
|
"pagefind": "^1.5.2",
|
|
82
86
|
"photoswipe": "^5.4.4",
|
|
83
|
-
"subset-font": "^2.5.0"
|
|
84
|
-
"@astrojs/sitemap": "^3.7.3",
|
|
85
|
-
"@xingwangzhe/satteri-mermaid": "0.7.1",
|
|
86
|
-
"@xingwangzhe/satteri-photoswipe": "^0.2.0",
|
|
87
|
-
"astro-expressive-code": "^0.44.1"
|
|
87
|
+
"subset-font": "^2.5.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@astrojs/rss": "^4.0.19",
|
package/scripts/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* npm run init # 或通过 npm script
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { existsSync, mkdirSync, cpSync, readdirSync, statSync
|
|
12
|
+
import { existsSync, mkdirSync, cpSync, readdirSync, statSync } from "node:fs";
|
|
13
13
|
import { join, resolve, dirname } from "node:path";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
|
|
@@ -6,12 +6,8 @@ import { Font } from "astro:assets";
|
|
|
6
6
|
import VerCount from "@components/stalux/common/verCount.astro";
|
|
7
7
|
import GoogleAnalytics from "@components/stalux/analytics/google.astro";
|
|
8
8
|
import BingClarity from "@components/stalux/analytics/clarity.astro";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// 预子集化的中文字体(由 scripts/font-subset.ts 在 prebuild 阶段生成)
|
|
12
|
-
// subset-font (harfbuzz WASM),纯 JS,无 native 依赖,CI 友好
|
|
13
|
-
import "@assets/../../public/fonts/subset.css";
|
|
14
|
-
|
|
9
|
+
import "@styles/base/init.css";
|
|
10
|
+
import Umami from "@components/stalux/analytics/umami.astro";
|
|
15
11
|
import { langToOpenGraphLocale } from "@utils/i18n";
|
|
16
12
|
import { getAuthorData, getHeadData, getPromoteData, getSiteData } from "@utils/config-utils";
|
|
17
13
|
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* 基于 Astro 7.1.3 Integration API(astro:config:setup / injectRoute / injectScript)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { resolve } from "node:path";
|
|
12
11
|
import path from "node:path";
|
|
13
12
|
import { fileURLToPath } from "node:url";
|
|
14
13
|
|
|
@@ -142,7 +141,7 @@ export function stalux(options: StaluxOptions = {}): AstroIntegration {
|
|
|
142
141
|
injectScript,
|
|
143
142
|
updateConfig,
|
|
144
143
|
addDevToolbarApp,
|
|
145
|
-
|
|
144
|
+
_config,
|
|
146
145
|
logger,
|
|
147
146
|
}) => {
|
|
148
147
|
const srcDir = fileURLToPath(new URL(".", import.meta.url));
|
|
@@ -163,17 +163,8 @@ const wordCharsCache = new Map<string, string>();
|
|
|
163
163
|
function collectCommonChars(projectRoot: string): string {
|
|
164
164
|
const chars = new Set(ALWAYS_INCLUDE_CHARS);
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
"src/i18n/*.json",
|
|
168
|
-
"src/components/stalux/**/*.astro",
|
|
169
|
-
"src/layouts/**/*.astro",
|
|
170
|
-
"src/pages/**/*.astro",
|
|
171
|
-
"src/pages/**/*.ts",
|
|
172
|
-
];
|
|
173
|
-
|
|
174
|
-
// Since we can't use glob here easily, scan specific known files
|
|
166
|
+
// Scan all source directories for UI text characters
|
|
175
167
|
const srcDir = resolve(projectRoot, "src");
|
|
176
|
-
const scanDirs = ["i18n", "components/stalux", "layouts", "pages"];
|
|
177
168
|
|
|
178
169
|
function scanDir(dir: string) {
|
|
179
170
|
if (!existsSync(dir)) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { satteri } from "@astrojs/markdown-satteri";
|
|
2
2
|
import sitemap from "@astrojs/sitemap";
|
|
3
|
-
import {
|
|
3
|
+
import { mermaidHast } from "@xingwangzhe/satteri-mermaid";
|
|
4
4
|
import { photoswipe } from "@xingwangzhe/satteri-photoswipe";
|
|
5
5
|
import expressiveCode from "astro-expressive-code";
|
|
6
6
|
import { defineConfig } from "astro/config";
|