Skip to content

Commit aac85cc

Browse files
committed
feat(website): 官网多语言首页与文案重构
- 新增 /zh/、/ja/ 固定语言首页路由,SSR 直出目标语言内容,修复 hydration 首帧不一致 - hreflang/sitemap 双向互指改为与 seo.ts 中 HOME_ALTERNATES 单一数据源同步 - 官网文案由"永久免费"改为"免费开源",突出 Rust 重写叙事 - HeroSection 模拟界面新增 program 分类图标与状态分组侧栏
1 parent 25b436c commit aac85cc

17 files changed

Lines changed: 649 additions & 262 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- **AI-agent ready** — built-in MCP (Model Context Protocol) server: let Claude, Cursor & other AI clients manage your downloads
3333
- **Resume anywhere** — full download state persisted in SQLite; survive crashes and reboots
3434
- **Beautiful UI** — light/dark themes, 13 color schemes, responsive three-pane layout
35-
- **Clean & private** — free forever, no ads, no tracking, no account, local-first
35+
- **Clean & private** — free and open source, no ads, no tracking, no account required, local-first
3636

3737
## Features
3838

@@ -52,7 +52,7 @@
5252

5353
| | FluxDown | IDM |
5454
|---|:---:|:---:|
55-
| Price | **Free forever** | $24.95 + renewals |
55+
| Price | **Free & open source** | $24.95 + renewals |
5656
| Open source | Yes (AGPL-3.0) | No |
5757
| Platforms | Windows / macOS / Linux / NAS / Android | Windows only |
5858
| BitTorrent & magnet | Yes | No |

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- **AI 智能体就绪** —— 内置 MCP(Model Context Protocol)服务器,Claude、Cursor 等 AI 客户端可直接管理下载
3333
- **随处续传** —— 下载状态全量持久化到 SQLite,崩溃断电不丢进度
3434
- **精美界面** —— 深浅主题、13 套配色、可调节三栏响应式布局
35-
- **干净纯粹** —— 永久免费、零广告、零追踪、无需账号、本地优先
35+
- **干净纯粹** —— 免费开源、零广告、零追踪、无需账号、本地优先
3636

3737
## 功能特性
3838

@@ -52,7 +52,7 @@
5252

5353
| | FluxDown | IDM |
5454
|---|:---:|:---:|
55-
| 价格 | **永久免费** | $24.95 + 续费 |
55+
| 价格 | **免费开源** | $24.95 + 续费 |
5656
| 开源 | 是(AGPL-3.0) ||
5757
| 平台 | Windows / macOS / Linux / NAS / Android | 仅 Windows |
5858
| BitTorrent 与磁力链 | 支持 | 不支持 |

website/astro.config.mjs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ const noindexPathnames = new Set(["/qq-group", "/telegram-group"]);
1717
// 构建时刻(ISO8601),用作 sitemap lastmod —— 每次部署刷新站点 freshness 信号。
1818
const BUILD_TIME = new Date().toISOString();
1919

20+
// 首页语言变体簇(与 src/lib/seo.ts HOME_ALTERNATES 一致;config 无法 import TS 常量,
21+
// 双处以注释互指)。sitemap xhtml:link 是 Google 认可的 hreflang 三种载体之一。
22+
const SITE = "https://fluxdown.zerx.dev";
23+
const HOME_VARIANT_PATHS = new Set(["/", "/zh/", "/ja/"]);
24+
const HOME_SITEMAP_LINKS = [
25+
{ url: `${SITE}/`, lang: "en" },
26+
{ url: `${SITE}/zh/`, lang: "zh" },
27+
{ url: `${SITE}/ja/`, lang: "ja" },
28+
{ url: `${SITE}/`, lang: "x-default" },
29+
];
30+
2031
// https://astro.com/docs/en/guides/environment-variables/
2132
export default defineConfig({
2233
site: "https://fluxdown.zerx.dev",
@@ -33,9 +44,11 @@ export default defineConfig({
3344
// 作为辅助信号:首页最高,其余默认。
3445
serialize: (item) => {
3546
item.lastmod = BUILD_TIME;
36-
if (new URL(item.url).pathname === "/") {
47+
const pathname = new URL(item.url).pathname;
48+
if (HOME_VARIANT_PATHS.has(pathname)) {
49+
item.links = HOME_SITEMAP_LINKS;
3750
item.changefreq = ChangeFreqEnum.WEEKLY;
38-
item.priority = 1.0;
51+
item.priority = pathname === "/" ? 1.0 : 0.9;
3952
}
4053
return item;
4154
},

0 commit comments

Comments
 (0)