@xingwangzhe/stalux 1.23.0 → 1.23.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.
Files changed (2) hide show
  1. package/README.md +5 -10
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  **[stalux.needhelp.icu](https://stalux.needhelp.icu)**
10
10
 
11
- A dark-themed, high-performance Astro blog theme with elegant glassmorphism design, per-route font subsetting, and a focus on content-first reading experience.
11
+ A dark-themed, high-performance Astro blog theme with elegant glassmorphism design, unicode-range font slicing, and a focus on content-first reading experience.
12
12
 
13
13
  ---
14
14
 
@@ -76,7 +76,7 @@ bun run dev
76
76
  ## ✨ Features
77
77
 
78
78
  - 🌙 **Dark mode** with elegant glassmorphism design
79
- - 🔤 **Per-route font subsetting** — 25 MB font → ~350 KB shared + ~1 KB per page
79
+ - 🔤 **Unicode-range font slicing** — 25 MB font → ~22 woff2 chunks, browser downloads only what matches the page
80
80
  - 🔍 **Full-text search** via Pagefind (auto-indexed on build)
81
81
  - 📡 **RSS & Atom feeds**
82
82
  - 🖼️ **PhotoSwipe** image lightbox
@@ -95,16 +95,11 @@ bun run dev
95
95
 
96
96
  ## 🔤 Font Optimization
97
97
 
98
- Stalux ships with a 25 MB Chinese font (LXGW WenKai). Instead of loading the full file, the build generates minimal subsets per route:
98
+ Stalux ships with a 25 MB Chinese font (LXGW WenKai) and a variable code font (Google Sans Code). Instead of loading the full files, the build slices the body font into ~22 woff2 chunks by `unicode-range` (via the official Astro Fonts API, `fontProviders.local()`), and the browser downloads only the chunks whose range matches characters on the page — typically 1–2 chunks (~200–600 KB each) for the above-the-fold content.
99
99
 
100
- | Subset | Size | Content |
101
- | --------- | --------- | ------------------------------------------ |
102
- | Common | ~350 KB | UI text, nav, i18n, shared post characters |
103
- | Per-route | ~0.5–3 KB | Unique characters for each page |
100
+ Every page emits `@font-face` rules with continuous `unicode-range` descriptors from the `<Font />` component; chunk filenames are content-addressed and deterministic across builds, keeping `experimental.incrementalBuild` caches stable (Astro ≥ 7.2.2).
104
101
 
105
- Every page loads `common.css` + `subset-{route}.css`. All route types are covered: `/`, `/about`, `/words`, `/posts/*`, `/archives`, `/tags`, `/categories`, `/links`.
106
-
107
- Powered by `subset-font` (Harfbuzz WASM), running at build time and on-demand in dev mode.
102
+ Powered by `subset-font` (Harfbuzz WASM), slicing at build time into `node_modules/.astro/stalux-fonts/`; the local provider reads files from disk with no network access.
108
103
 
109
104
  ---
110
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingwangzhe/stalux",
3
- "version": "1.23.0",
3
+ "version": "1.23.2",
4
4
  "description": "A powerful, modern Astro blog theme — use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -82,9 +82,9 @@
82
82
  "@mcp-b/webmcp-polyfill": "^4.0.0",
83
83
  "@pagefind/component-ui": "^1.5.2",
84
84
  "@waline/client": "^3.15.2",
85
- "@xingwangzhe/satteri-mermaid": "0.7.3",
86
- "@xingwangzhe/satteri-photoswipe": "^0.2.2",
87
- "@xingwangzhe/tags-cloud": "^1.2.5",
85
+ "@xingwangzhe/satteri-mermaid": "0.7.6",
86
+ "@xingwangzhe/satteri-photoswipe": "^0.2.3",
87
+ "@xingwangzhe/tags-cloud": "^1.2.6",
88
88
  "animejs": "^4.5.0",
89
89
  "astro-expressive-code": "^0.44.1",
90
90
  "astro-seo": "^1.1.0",
@@ -106,6 +106,6 @@
106
106
  "typescript": "^7.0.2"
107
107
  },
108
108
  "peerDependencies": {
109
- "astro": "7.2.1"
109
+ "astro": "7.2.2"
110
110
  }
111
111
  }