diff --git a/.cache/contributors.json b/.cache/contributors.json index 2f489b6..e35162a 100644 --- a/.cache/contributors.json +++ b/.cache/contributors.json @@ -1,6 +1,6 @@ { - "updated_at": "2026-07-15T05:53:30.409Z", - "total": 170, + "updated_at": "2026-07-17T07:34:29.610Z", + "total": 169, "contributors": [ { "username": "whybeyoung", @@ -35,7 +35,7 @@ { "username": "dongmucat", "avatar_url": "https://avatars.githubusercontent.com/u/70678707?v=4", - "contributions": 317, + "contributions": 318, "profile_url": "https://github.com/dongmucat" }, { @@ -53,7 +53,7 @@ { "username": "FenjuFu", "avatar_url": "https://avatars.githubusercontent.com/u/92919259?v=4", - "contributions": 164, + "contributions": 169, "profile_url": "https://github.com/FenjuFu" }, { @@ -98,18 +98,18 @@ "contributions": 99, "profile_url": "https://github.com/doctorbruce" }, + { + "username": "dongjiang1989", + "avatar_url": "https://avatars.githubusercontent.com/u/5010507?v=4", + "contributions": 93, + "profile_url": "https://github.com/dongjiang1989" + }, { "username": "Kexinist", "avatar_url": "https://avatars.githubusercontent.com/u/108705088?v=4", "contributions": 93, "profile_url": "https://github.com/Kexinist" }, - { - "username": "dongjiang1989", - "avatar_url": "https://avatars.githubusercontent.com/u/5010507?v=4", - "contributions": 91, - "profile_url": "https://github.com/dongjiang1989" - }, { "username": "xuehaoweng", "avatar_url": "https://avatars.githubusercontent.com/u/73582376?v=4", @@ -386,12 +386,6 @@ "contributions": 13, "profile_url": "https://github.com/gaozhenfeng1" }, - { - "username": "OLDyade", - "avatar_url": "https://avatars.githubusercontent.com/u/75075125?v=4", - "contributions": 13, - "profile_url": "https://github.com/OLDyade" - }, { "username": "tap-top", "avatar_url": "https://avatars.githubusercontent.com/u/9601223?v=4", @@ -735,10 +729,10 @@ "profile_url": "https://github.com/fangdudu" }, { - "username": "Rsweater", - "avatar_url": "https://avatars.githubusercontent.com/u/49091147?v=4", + "username": "myml", + "avatar_url": "https://avatars.githubusercontent.com/u/13045857?v=4", "contributions": 2, - "profile_url": "https://github.com/Rsweater" + "profile_url": "https://github.com/myml" }, { "username": "tenten-shih", @@ -747,10 +741,10 @@ "profile_url": "https://github.com/tenten-shih" }, { - "username": "myml", - "avatar_url": "https://avatars.githubusercontent.com/u/13045857?v=4", + "username": "Rsweater", + "avatar_url": "https://avatars.githubusercontent.com/u/49091147?v=4", "contributions": 2, - "profile_url": "https://github.com/myml" + "profile_url": "https://github.com/Rsweater" }, { "username": "Xparadigm-jay", diff --git a/.cache/project-stats.json b/.cache/project-stats.json index 9872341..7d8dc0b 100644 --- a/.cache/project-stats.json +++ b/.cache/project-stats.json @@ -1,50 +1,50 @@ { - "updated_at": "2026-07-16T19:03:59.458Z", + "updated_at": "2026-07-17T07:33:43.505Z", "repos": { "iflytek/astron-agent": { "stars": 8621, "forks": 864, - "updated_at": "2026-07-16T19:03:57.903Z" + "updated_at": "2026-07-17T07:33:39.124Z" }, "iflytek/astron-rpa": { - "stars": 5214, + "stars": 5215, "forks": 585, - "updated_at": "2026-07-16T19:03:58.098Z" + "updated_at": "2026-07-17T07:33:39.706Z" }, "iflytek/astronclaw-tutorial": { "stars": 418, "forks": 43, - "updated_at": "2026-07-16T19:03:58.279Z" + "updated_at": "2026-07-17T07:33:40.256Z" }, "iflytek/domux": { "stars": 17, "forks": 2, - "updated_at": "2026-07-16T19:03:58.501Z" + "updated_at": "2026-07-17T07:33:40.844Z" }, "harnessclaw/harnessclaw-engine": { "stars": 272, "forks": 91, - "updated_at": "2026-07-16T19:03:58.696Z" + "updated_at": "2026-07-17T07:33:41.370Z" }, "harnessclaw/harnessclaw": { "stars": 332, "forks": 89, - "updated_at": "2026-07-16T19:03:58.893Z" + "updated_at": "2026-07-17T07:33:41.885Z" }, "iflytek/iFly-Skills": { "stars": 202, "forks": 24, - "updated_at": "2026-07-16T19:03:59.083Z" + "updated_at": "2026-07-17T07:33:42.430Z" }, "iflytek/memflywheel": { - "stars": 20, + "stars": 21, "forks": 3, - "updated_at": "2026-07-16T19:03:59.271Z" + "updated_at": "2026-07-17T07:33:42.976Z" }, "iflytek/skillhub": { - "stars": 3964, - "forks": 674, - "updated_at": "2026-07-16T19:03:59.458Z" + "stars": 3974, + "forks": 634, + "updated_at": "2026-07-17T07:33:43.505Z" } } } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4d7a5..920dff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +4,24 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [0.4.0] - 2026-07-17 + ### Added - **Hugging Face Icon Asset**: Download official Hugging Face SVG logo to `src/assets/images/hugging-face.svg`; replace inline placeholder SVGs in `ProjectCard.astro` and `[slug].astro` with `` - **Blog Post Language Variants**: Posts can declare `lang` and `translationId` frontmatter to link zh/en versions — the site language toggle switches between variants on post pages (`data-translation-url` navigation in `BasicScripts.astro`), list/grid cards render both variants and swap via `.i18n-zh`/`.i18n-en` classes, and translated variants are excluded from pagination, RSS, related and adjacent posts (`fetchPosts` vs `fetchAllPosts` in `blog.ts`). First bilingual post: Astron SkillHub joining AAIF as Associate Member (news, zh + en) +### Changed + +- **Search Index Blog Deduplication**: `search-index.json.ts` now groups blog posts by `translationId` — bilingual pairs merge into a single entry carrying `title`/`titleEn`, `excerpt`/`excerptEn`, and both `url`/`urlEn`; monolingual posts remain as single entries. Index shrinks from 11 to 9 blog entries for 7 monolingual + 2 bilingual pairs +- **SearchModal Language-Aware URLs**: `SearchModal.astro` selects `item.urlEn` when system language is English, so search result clicks navigate to the correct language variant of the blog post +- **PostNavigation Language-Aware**: `PostNavigation.astro` receives the current `post` and uses `display()` helper to show prev/next titles and URLs matching the page language — bilingual posts show the translation title + URL, monolingual posts show their native content +- **TableOfContents i18n**: TOC sidebar heading "目录" replaced with `data-i18n="blog.tableOfContents"` — shows "Table of Contents" in English mode; translation key added to `translations.ts` + ### Fixed - **CI Auto-Update Workflows**: Scheduled workflows (`Update Project Stats`, `Update Contributors`) failed with GH013 because `GITHUB_TOKEN` cannot bypass the "Protect default branch" ruleset — replaced with `ADMIN_PAT` secret (repo admin added to ruleset bypass list) -- **Observer Redeclaration on View Transitions**: `const Observer` in `BasicScripts.astro` top-level `is:inline` script caused `SyntaxError: Identifier 'Observer' has already been declared` when Astro client router swapped pages — wrapped in IIFE `(() => { ... })()` to create function scope +- **Observer Redeclaration on View Transitions**: `const Observer` in `BasicScripts.astro` top-level `is:inline` script caused `SyntaxError: Identifier 'Observer' has already been declared` when Astro client router swapped pages — wrapped in IIFE `(() => { ... })()` to create function scope, exposed as `window.Observer` so the theme toggle script block can access `Observer.removeAnimationDelay()` ## [0.3.0] - 2026-07-03 @@ -53,6 +62,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- **Landscape Arrow Label Overlap & Title Truncation**: SVG relationship arrow labels ("触发 RPA"/"提供 API") overlapped section titles; narrow column titles (AGENT-MANAGEMENT) were truncated — rotated labels vertical (`rotate(-90)`), added `whitespace-nowrap` and reduced title font 13→12px for all 8 section headers - **Search View Transitions**: `const` DOM refs became stale after page swap — changed to `let` with `refreshRefs()` + `attachElementListeners()` called in `astro:after-swap` - **Adopter Multi-Cycle Failure**: Modal broke after multiple open/close/navigation cycles — fixed by calling `loadAdopterData()` in every `openModal()`, `syncHash()`, and `astro:after-swap` handler - **Adopter Direct URL Hash**: Navigating to `/adopters#adopter-xxx` didn't show card when DOM wasn't ready — fixed with retry mechanism (20 attempts × 50ms) diff --git a/package-lock.json b/package-lock.json index 5a8b868..fdd2837 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iflytek/website", - "version": "0.3.0", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@iflytek/website", - "version": "0.3.0", + "version": "0.4.0", "dependencies": { "@astrojs/rss": "^4.0.19", "@astrojs/sitemap": "^3.7.3", @@ -8080,6 +8080,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8100,6 +8101,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8120,6 +8122,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8140,6 +8143,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8160,6 +8164,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8180,6 +8185,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8200,6 +8206,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8220,6 +8227,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8240,6 +8248,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8260,6 +8269,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -8280,6 +8290,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ diff --git a/package.json b/package.json index 7125f1b..d7ece50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iflytek/website", - "version": "0.3.0", + "version": "0.4.0", "description": "iFLYTEK Open Source Website - Showcasing open source projects, blog, events and community contributions.", "type": "module", "private": true, diff --git a/src/components/blog/PostNavigation.astro b/src/components/blog/PostNavigation.astro index dff2f1e..a015d3b 100644 --- a/src/components/blog/PostNavigation.astro +++ b/src/components/blog/PostNavigation.astro @@ -2,11 +2,21 @@ import type { Post } from '~/types'; export interface Props { + post: Post; prev?: Post; next?: Post; } -const { prev, next } = Astro.props; +const { post, prev, next } = Astro.props; +const currentLang = post.lang || 'zh'; + +/** Pick the title/permalink that matches the current page language. */ +const display = (p: Post) => { + if (currentLang === 'en' && p.translation && p.translation.lang === 'en') { + return { title: p.translation.title, href: '/' + p.translation.permalink }; + } + return { title: p.title, href: '/' + p.permalink }; +}; ---
@@ -14,14 +24,14 @@ const { prev, next } = Astro.props; { prev ? ( 上一篇

- {prev.title} + {display(prev).title}

) : ( @@ -31,14 +41,14 @@ const { prev, next } = Astro.props; { next ? ( 下一篇

- {next.title} + {display(next).title}

) : ( diff --git a/src/components/blog/TableOfContents.astro b/src/components/blog/TableOfContents.astro index c09d2c6..29a242a 100644 --- a/src/components/blog/TableOfContents.astro +++ b/src/components/blog/TableOfContents.astro @@ -26,7 +26,9 @@ const tocHeadings = headings.filter((h) => h.depth >= 2 && h.depth <= 3); { tocHeadings.length > 0 && (