@xingwangzhe/stalux 1.21.1 → 1.21.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingwangzhe/stalux",
3
- "version": "1.21.1",
3
+ "version": "1.21.2",
4
4
  "description": "A powerful, modern Astro blog theme — use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  import { getCollection } from "astro:content";
3
+ import { createTranslator } from "@utils/i18n";
3
4
  const configEntries = await getCollection("config");
4
5
  const siteConfig = getSiteData(configEntries);
5
6
  const siteTitle = siteConfig.title;
6
7
  const siteDescription = siteConfig.description;
8
+ const { t } = createTranslator(siteConfig.lang || "zh-CN");
7
9
  import Stalux from "@layouts/Stalux.astro";
8
10
  import styles from "@styles/pages/home.module.css";
9
11
  import Navs from "@components/stalux/layout/navs.astro";
@@ -21,7 +23,7 @@ import { getSiteData, getAuthorData, getHeadData, getNavsData, getLinksData, get
21
23
  <div class={styles.homeNavs}>
22
24
  <Navs />
23
25
  </div>
24
- <h2 class="sr-only" style="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;">关于本站</h2>
26
+ <h2 class="sr-only" style="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;">{t("ai.about")}</h2>
25
27
  <Author />
26
28
  <TextType />
27
29
  <DateTime />