Skip to content

Commit 53524fb

Browse files
authored
Merge pull request #21 from iflytek/fix-issues
feat: real-time GitHub data on Vercel SSR + UI polish & repo hygiene
2 parents 44714b3 + 2724dfd commit 53524fb

30 files changed

Lines changed: 790 additions & 7295 deletions

.cache/contributors.json

Lines changed: 243 additions & 7119 deletions
Large diffs are not rendered by default.

.cache/project-stats.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"updated_at": "2026-06-15T03:53:56.508Z",
3+
"repos": {
4+
"iflytek/astron-agent": {
5+
"stars": 8560,
6+
"forks": 853,
7+
"updated_at": "2026-06-15T03:44:02.055Z"
8+
},
9+
"iflytek/astron-rpa": {
10+
"stars": 5177,
11+
"forks": 576,
12+
"updated_at": "2026-06-15T03:44:02.631Z"
13+
},
14+
"iflytek/astronclaw-tutorial": {
15+
"stars": 410,
16+
"forks": 41,
17+
"updated_at": "2026-06-15T03:44:03.239Z"
18+
},
19+
"iflytek/iFly-Skills": {
20+
"stars": 184,
21+
"forks": 23,
22+
"updated_at": "2026-06-15T03:44:03.848Z"
23+
},
24+
"iflytek/skillhub": {
25+
"stars": 3462,
26+
"forks": 500,
27+
"updated_at": "2026-06-15T03:44:04.442Z"
28+
}
29+
}
30+
}

.github/ISSUE_TEMPLATE/leadership-change.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ body:
3838
label: "Prerequisites for new leads:"
3939
options:
4040
- label: Are an org member
41-
- label: Have read and agree to abide by the [Code of Conduct](https://github.com/iflytek/community/blob/main/code-of-conduct.md)
41+
- label: Have read and agree to abide by the [Code of Conduct](https://github.com/iflytek/community/blob/master/code-of-conduct.md)
4242
- id: req_checklist
4343
type: checkboxes
4444
attributes:
4545
label: "Onboarding / Offboarding tasks:"
4646
options:
47-
- label: Updated [OWNERS](https://github.com/iflytek/community/blob/main/OWNERS) file. **NOTE:** If offboarding, remember to remove from approvers.
48-
- label: Updated [MAINTAINERS.md](https://github.com/iflytek/community/blob/main/MAINTAINERS.md).
47+
- label: Updated [OWNERS](https://github.com/iflytek/community/blob/master/OWNERS) file. **NOTE:** If offboarding, remember to remove from approvers.
48+
- label: Updated [MAINTAINERS.md](https://github.com/iflytek/community/blob/master/MAINTAINERS.md).
4949
- label: Updated access/teams in project infrastructure.
5050
- label: Updated ownership of group mailing list.
5151
- label: Updated ownership of group calendar.

.github/ISSUE_TEMPLATE/moderator_application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body:
3131
required: true
3232
- label: I have [enabled 2FA on my GitHub account](https://github.com/settings/security)
3333
required: true
34-
- label: I have read and will abide by the policies mentioned in the [Moderation Guidelines](https://github.com/iflytek/community/blob/main/code-of-conduct.md)
34+
- label: I have read and will abide by the policies mentioned in the [Moderation Guidelines](https://github.com/iflytek/community/blob/master/code-of-conduct.md)
3535
required: true
3636
- label: I have two sponsors that meet the sponsor requirements
3737
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Thanks for sending a pull request! Here are some tips for you:
22
3-
- If this is your first contribution, read our Getting Started guide https://github.com/iflytek/community/blob/main/CONTRIBUTING.md
3+
- If this is your first contribution, read our Getting Started guide https://github.com/iflytek/community/blob/master/CONTRIBUTING.md
44
55
-->
66

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update Project Stats
2+
3+
on:
4+
schedule:
5+
- cron: '0 18 * * *' # Daily at 2:00 AM Beijing time (UTC+8)
6+
workflow_dispatch: # Manual trigger
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
update:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version: 24
21+
cache: npm
22+
- run: npm ci
23+
- name: Fetch project stats from GitHub API
24+
run: npm run fetch:project-stats
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Commit and push if changed
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
git add .cache/project-stats.json
32+
git diff --cached --quiet || git commit -m "chore: update project stats [skip ci]"
33+
git push

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ lerna-debug.log*
3030
# ============================================
3131
# Cache directories
3232
# ============================================
33-
# Keep contributors.json for site to work
33+
# Keep contributors.json and project-stats.json for site to work
3434
.cache/*
3535
!.cache/contributors.json
36-
.tmp-community/
36+
!.cache/project-stats.json
37+
.vercel/
3738

3839
# ============================================
3940
# Package manager lock files

.prettierignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ node_modules
33
.github
44
.changeset
55
.cache
6-
contributing.md
7-
security.md
6+
.vercel
7+
CONTRIBUTING.md
8+
SECURITY.md

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9+
- **Real-time Project Stats**: `getProjectsWithStats()` utility fetches live stars/forks from GitHub API at runtime (Vercel SSR), falls back to `.cache/project-stats.json` at build time
10+
- **Project Stats Script**: `scripts/fetch-project-stats.ts` fetches stars/forks for all project repos via GitHub API, saves to `.cache/project-stats.json`
11+
- **Project Stats CI**: `.github/workflows/update-project-stats.yml` — daily GitHub Action at 2:00 AM Beijing time to refresh cached stats
12+
- **Vercel SSR Pages**: `/projects`, `/projects/[slug]`, `/contribute` marked `export const prerender = false` for real-time data via Vercel serverless functions (Astro 6.x static mode supports per-page SSR)
13+
- **In-memory Cache**: 5-minute TTL memory cache in `getProjectsWithStats()` and `fetchContributorsLive()` to reduce API calls on warm serverless invocations
914
- **Favicon**: Replace favicon and logo icon with iFLYTEK GitHub avatar (`avatars.githubusercontent.com/u/26786495`)
10-
- **Contributors**: Fetch 846 real contributors from GitHub API (64 repos) replacing placeholder data
15+
- **Contributors**: Fetch 164 real contributors from GitHub API (56 original repos, 8 forks excluded) replacing placeholder data
1116
- **Projects**: Add 3 new categories — RPA & Automation, AI Skills, Tutorials
1217
- **Projects**: Show project count `(N)` on category filter buttons, matching Events page style
1318
- **Contribute**: Make "How to Contribute" cards clickable with links to `iflytek/community` (Issues, Contributing Guide, Code of Conduct)
@@ -18,10 +23,15 @@ All notable changes to this project will be documented in this file.
1823

1924
### Changed
2025

26+
- **Project Detail Page**: Replace `getStaticPaths` + `Astro.props` with dynamic `Astro.params.slug` lookup + `getProjectsWithStats()` for real-time stats on each request
27+
- **Contributors Fetching**: `contribute.astro` now calls GitHub API directly at runtime (via native `fetch`) when `GITHUB_TOKEN` is set, falls back to `.cache/contributors.json` otherwise
28+
- **Fork Filtering**: `fetch-contributors.ts` now excludes fork repos (`repo.fork`) and archived repos (`repo.archived`) to prevent upstream contributors from appearing on the wall
29+
- **Gradient Colors**: Introduce semantic tokens `--color-gradient-start` / `--color-gradient-end` (referencing primary-600/accent-500) in `tailwind.css`, replacing hardcoded `from-blue-600 to-purple-600` across all pages
30+
- **Hover Styles**: Unify card hover effects across all pages — `hover:shadow-lg`, `hover:-translate-y-0.5`, `dark:hover:border-primary-800` — including dark mode
31+
- **Community Files Post-processing**: `scripts/fetch-community-files.ts` now runs `postProcessFiles()` in `finally` block on every build, auto-fixing `blob/main``blob/master` links and relative URL conversion even when git clone fails
2132
- **Logo**: Replace 🚀 emoji with iFLYTEK avatar image in site header
2233
- **Tailwind**: Define complete primary (50–950) and accent (50–950) color scales in `@theme` — fixes transparent text/icons caused by missing numbered variants in Tailwind v4
2334
- **Projects**: Remove Featured badge, sort projects by stars only
24-
- **Projects**: Unify card borders and icon gradient (`from-blue-600 to-purple-600`) across all pages
2535
- **Projects**: Wrap ProjectCard in `<div class="project-card">` to fix category filter selecting filter buttons
2636
- **Events**: Add dark mode hover effects (`dark:hover:border-primary-800`) to event cards and news cards
2737
- **Contribute**: Fix all community links — `blob/main``blob/master`, `CODE_OF_CONDUCT.md``code-of-conduct.md` (lowercase)
@@ -40,6 +50,7 @@ All notable changes to this project will be documented in this file.
4050
- **View Transitions**: Category filter buttons on `/projects` and type filter on `/events` did not work during client-side navigation — fixed with `is:inline` script and `readyState` check
4151
- **Community Links**: 404 errors from wrong branch name (`main` vs `master`) and wrong filename case (`CODE_OF_CONDUCT.md` vs `code-of-conduct.md`)
4252
- **Project Card**: `data-category` attribute forwarded to component conflicted with filter `querySelectorAll('[data-category]')` — fixed by wrapping in explicit `<div class="project-card">`
53+
- **ESLint/Prettier scanning `.vercel/`**: Build output directory was being scanned by linter/formatter — fixed by adding `.vercel` and `.cache` to ignore lists
4354

4455
## [0.1.0] - 2025-06-12
4556

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# CODE OF CONDUCT
1+
# Iflytek Community Code of Conduct
22

3-
Please visit https://github.com/iflytek/community for the latest version.
3+
Please refer to our [Iflytek Community Code of Conduct](https://github.com/iflytek/community/blob/master/code-of-conduct.md)

0 commit comments

Comments
 (0)