@xingwangzhe/stalux 1.5.2 → 1.5.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingwangzhe/stalux",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "A powerful, modern Astro blog theme \u2014 use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -204,6 +204,21 @@ function collectCommonChars(projectRoot: string): string {
204
204
  }
205
205
  }
206
206
 
207
+ // Also scan post frontmatter for tags, categories so those pages' chars are covered
208
+ const postsDir = resolve(projectRoot, CONTENT_ROOT, "posts");
209
+ if (existsSync(postsDir)) {
210
+ for (const f of readdirSync(postsDir)) {
211
+ if (!f.endsWith(".md") && !f.endsWith(".mdx")) continue;
212
+ if (f.startsWith("_")) continue;
213
+ try {
214
+ const content = readFileSync(join(postsDir, f), "utf-8");
215
+ for (const ch of content) chars.add(ch);
216
+ } catch {
217
+ /* skip */
218
+ }
219
+ }
220
+ }
221
+
207
222
  return [...chars].sort().join("");
208
223
  }
209
224