-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 详情页,移动端隐藏勋章logo * feat: 新增合作社区,详情页logo替换 * fix: rename logo-award * fix: conflict * feat: 合作社区增加 * fix: 更新2024 用户榜单信息 * fix: 增加更新用户详情脚本 * fix: 增加更新 osgraph 模板 * fix: 更新 2024 rankingList 数据 * fix: 更新 2024 user 数据 * fix: 晚上生成用户详情页脚本细节 * fix: 用户详情缺失,通过基本生成默认用户页面 * fix: 更新 rankingList * fix: 更新缺失往年用户数据 * fix: 补充脚本说明 * fix: 增加往年榜当页面,首页只保留最新一年的榜单数据 * fix: 完善文档 * fix: 恢复 ranking 模板 * fix: 更新首页数据与 2024-8 * fix: 详情页调整 * fix: 批量;批量更新2024详情页 * fix: 往年榜单详情模板调整,首页榜单只保留联合发起方 * docs: update readme * docs: rename file * docs: add description * update: an-lee metadata update
- Loading branch information
Showing
252 changed files
with
7,001 additions
and
1,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
### 项目开发 | ||
|
||
### 如何更新用户 github 信息? | ||
仓库 `script` 目录下存放了三个脚本 | ||
- sync_xlab.js 从 xlab 接口 根据年份来同步 `rankingList.json` 中的最新排行信息,同步完成后需要 使用 update_year_user 来重新获取 github 用户信息。 | ||
- update_year_user.js 根据年份来更新 `rankingList.json` 里面的用户的 github 信息,注意需要配置 github token 否则会被 github api 限制拉取频率导致更新失败, 然后修改 main 函数里面的需要更新的年份的信息即可。 | ||
- update_all_user.js 更新整个 `rankingList.json` 中所有用户信息, 同样需要配置 github token 否则会被 github api 限制拉取频率导致更新失败。 | ||
- front-matter.js, 在使用上面的脚本更新完用户信息后,使用此脚本来讲信息同步到 `source` 目录下对应的文件下的 `index.md` 的 front-matter 中 (--- front-matter ---) | ||
|
||
`rankingList.json` 文件下数据更新前的机构 | ||
|
||
```json | ||
[ | ||
{ | ||
"year": 1999, | ||
"annualRanking": [ | ||
{ | ||
"ranking": 1, | ||
"login": "aaa", | ||
}, | ||
{ | ||
"ranking": 2, | ||
"login": "bbb", | ||
} | ||
] | ||
} | ||
...其它年份 | ||
] | ||
``` | ||
|
||
脚本更新后的数据结构 | ||
```json | ||
[ | ||
{ | ||
"year": 1999, | ||
"annualRanking": [ | ||
{ | ||
"ranking": 1, | ||
"login": "aaa", | ||
"github_id": 278432, | ||
"github_avatar": "https://avatars.githubusercontent.com/u/1111?v=4", | ||
"location": "上海,中国", | ||
"github_name": "a name" | ||
}, | ||
{ | ||
"ranking": 2, | ||
"login": "bbb", | ||
"github_id": 2222, | ||
"github_avatar": "https://avatars.githubusercontent.com/u/2222?v=4", | ||
"location": "上海,中国", | ||
"github_name": "b name" | ||
} | ||
] | ||
} | ||
...其它年份 | ||
] | ||
``` | ||
|
||
### 往年榜单 | ||
|
||
所有往年榜单都在 `source/opensource-ranking` 目录下,每个文件都是一个年度榜单,文件名为 `2022.md` 这样的格式, 只需要修改里面的年份即可。 | ||
例如 | ||
```md | ||
--- | ||
title: 榜单详情 2022 | ||
permalink: /ranking-2022 | ||
data_year: 2022 | ||
--- | ||
|
||
``` | ||
|
||
首页只会展示最新一年的榜单数据。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.