Skip to content

Commit d97c9c0

Browse files
feat: add rankings
1 parent 5ae947b commit d97c9c0

8 files changed

Lines changed: 473 additions & 25 deletions

File tree

document/projects/index.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@ Awesome-Embedded-Learning-Studio 旗下所有开源项目和教程,按四条
99
<ProjectGrid>
1010
<ProjectCard name="Tutorial_AwesomeModernCPP" link="/projects/tutorial-awesome-modern-cpp"
1111
repo="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP"
12-
lang="C++" :stars="82" status="active" :beginner="true">
12+
lang="C++" status="active" :beginner="true">
1313
10 卷体系现代 C++ 系统教程(C++11~C++23),涵盖 STL、并发、性能、嵌入式实战与开源项目研读
1414
</ProjectCard>
1515
<ProjectCard name="Tutorial_cpp_SimpleIniParser" link="/projects/tutorial-cpp-simple-ini-parser"
1616
repo="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_cpp_SimpleIniParser"
17-
lang="C++" :stars="6" status="active" :beginner="true">
17+
lang="C++" status="active" :beginner="true">
1818
手搓 INI 解析器,配套 B 站 12 集视频的 C++ 工程化入门实战
1919
</ProjectCard>
2020
<ProjectCard name="Project_MakeAMemroyPool" link="/projects/project-make-a-memory-pool"
2121
repo="https://github.com/Awesome-Embedded-Learning-Studio/Project_MakeAMemroyPool"
22-
lang="C++" :stars="7" status="active" :beginner="true">
22+
lang="C++" status="active" :beginner="true">
2323
配合 B 站视频的内存池实战,从 FreeList 到 ThreadLocal 逐步实现
2424
</ProjectCard>
2525
<ProjectCard name="CFBox" link="/projects/cfbox"
2626
repo="https://github.com/Awesome-Embedded-Learning-Studio/CFBox"
27-
lang="C++" :stars="5" status="active">
27+
lang="C++" status="active">
2828
C++23 实现的现代 BusyBox 替代品,109 个 Unix 工具小程序,446KB 极致体积
2929
</ProjectCard>
3030
<ProjectCard name="Project_CXXBaseComponents" link="/projects/project-cxx-base-components"
3131
repo="https://github.com/Awesome-Embedded-Learning-Studio/Project_CXXBaseComponents"
32-
lang="C++" :stars="1" status="active" :beginner="true">
32+
lang="C++" status="active" :beginner="true">
3333
B 站动画系列配套源码,含 ArgParser、FileCopier、IniParser 等渐进式实战项目
3434
</ProjectCard>
3535
<ProjectCard name="edgecv" link="/projects/edgecv"
3636
repo="https://github.com/Awesome-Embedded-Learning-Studio/edgecv"
37-
lang="C++" :stars="0" status="developing">
37+
lang="C++" status="developing">
3838
C++20 编译期类型安全计算机视觉库,零拷贝视图 + Pipeline 组合
3939
</ProjectCard>
4040
</ProjectGrid>
@@ -44,17 +44,17 @@ C++20 编译期类型安全计算机视觉库,零拷贝视图 + Pipeline 组
4444
<ProjectGrid>
4545
<ProjectCard name="imx-forge" link="/projects/imx-forge"
4646
repo="https://github.com/Awesome-Embedded-Learning-Studio/imx-forge"
47-
lang="Shell" :stars="56" status="active">
47+
lang="Shell" status="active">
4848
面向 i.MX6ULL 的嵌入式 Linux 开发工坊,Docker 一键环境,双轨内核(BSP + Mainline)
4949
</ProjectCard>
5050
<ProjectCard name="rk-forge" link="/projects/rk-forge"
5151
repo="https://github.com/Awesome-Embedded-Learning-Studio/rk-forge"
52-
:stars="4" status="active">
52+
status="active">
5353
Rockchip 平台开发者工作空间,脚本库 + 驱动参考 + 结构化补丁管理
5454
</ProjectCard>
5555
<ProjectCard name="PenguinLab" link="/projects/penguin-lab"
5656
repo="https://github.com/Awesome-Embedded-Learning-Studio/PenguinLab"
57-
lang="Shell" :stars="0" status="active">
57+
lang="Shell" status="active">
5858
基于 QEMU 的 Linux 内核学习站,6 层知识图谱 89 节点,多架构支持
5959
</ProjectCard>
6060
</ProjectGrid>
@@ -64,26 +64,27 @@ Rockchip 平台开发者工作空间,脚本库 + 驱动参考 + 结构化补
6464
<ProjectGrid>
6565
<ProjectCard name="ST-Forge" link="/projects/st-forge"
6666
repo="https://github.com/Awesome-Embedded-Learning-Studio/ST-Forge"
67-
lang="C" :stars="2" status="developing">
67+
lang="C" status="developing">
6868
STM32 HAL 驱动框架,CMake 原生构建,不依赖 IDE
6969
</ProjectCard>
7070
<ProjectCard name="BareMetal-Drivers" link="/projects/baremetal-drivers"
7171
repo="https://github.com/Awesome-Embedded-Learning-Studio/BareMetal-Drivers"
72-
lang="C" :stars="3" status="active">
72+
lang="C" status="active">
7373
单片机裸机通用驱动库,涵盖 GPIO、I2C、OLED、图形渲染、UI 组件
7474
</ProjectCard>
7575
<ProjectCard name="Project_MicroWatch" link="/projects/project-micro-watch"
7676
repo="https://github.com/Awesome-Embedded-Learning-Studio/Project_MicroWatch"
77-
lang="C" :stars="1" status="developing">
77+
lang="C" status="developing">
7878
资源受限平台智能手表原型,规划了 DinoGame / 计步 / 指南针
7979
</ProjectCard>
8080
<ProjectCard name="micro-forge" link="/projects/micro-forge"
8181
repo="https://github.com/Awesome-Embedded-Learning-Studio/micro-forge"
82-
lang="C++" :stars="1" status="active">
82+
lang="C++" status="active">
8383
ARM Cortex-M3 (STM32F103) 全系统模拟器,无需硬件即可运行和调试固件
8484
</ProjectCard>
8585
<ProjectCard name="Tutorial_FreeRTOS" link="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_FreeRTOS"
86-
lang="—" :stars="1" status="planned">
86+
repo="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_FreeRTOS"
87+
lang="—" status="planned">
8788
FreeRTOS 系列开源教程
8889
</ProjectCard>
8990
</ProjectGrid>
@@ -93,17 +94,17 @@ FreeRTOS 系列开源教程
9394
<ProjectGrid>
9495
<ProjectCard name="Tutorial_AwesomeQt" link="/projects/tutorial-awesome-qt"
9596
repo="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_AwesomeQt"
96-
lang="TypeScript" :stars="27" status="active" :beginner="true">
97+
lang="TypeScript" status="active" :beginner="true">
9798
Qt 6 百科全书式教程,三层分级(入门/进阶/专家),从第一行代码到读懂 Qt 源码
9899
</ProjectCard>
99100
<ProjectCard name="CFDesktop" link="/projects/cfdesktop"
100101
repo="https://github.com/Awesome-Embedded-Learning-Studio/CFDesktop"
101-
lang="C++" :stars="5" status="developing">
102+
lang="C++" status="developing">
102103
基于 Qt6 的嵌入式 Material Design 3 桌面框架,性能自适应 ARM 到 RK3588
103104
</ProjectCard>
104105
<ProjectCard name="qt-compile-pipeline" link="/projects/qt-compile-pipeline"
105106
repo="https://github.com/Awesome-Embedded-Learning-Studio/qt-compile-pipeline"
106-
lang="Shell" :stars="2" status="active">
107+
lang="Shell" status="active">
107108
Qt6 ARM 交叉编译自动化管道,配置极简、一键构建、幂等设计
108109
</ProjectCard>
109110
</ProjectGrid>
@@ -112,7 +113,8 @@ Qt6 ARM 交叉编译自动化管道,配置极简、一键构建、幂等设计
112113

113114
<ProjectGrid>
114115
<ProjectCard name="Tutorial_EmbeddedCommonTools" link="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_EmbeddedCommonTools"
115-
lang="—" :stars="1" status="planned">
116+
repo="https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_EmbeddedCommonTools"
117+
lang="—" status="planned">
116118
嵌入式开发通用工具教程
117119
</ProjectCard>
118120
</ProjectGrid>
@@ -140,9 +142,4 @@ Modern C++23 shell framework,零开销可移植
140142

141143
## 统计
142144

143-
| 指标 ||
144-
|------|-----|
145-
| 公开仓库 | 21 |
146-
| 总 Stars | 220+ |
147-
| 主要语言 | C, C++, Shell, TypeScript |
148-
| 贡献者 | 3+ |
145+
<OrgStats />

document/ranking/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "热度排行"
3+
---
4+
5+
## 项目热度排行
6+
7+
按 Stars 数实时排名,点击可跳转 GitHub 仓库。
8+
9+
<RankingTable />

project.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default defineProject({
1818
'zh-CN': [
1919
{ text: '首页', link: '/' },
2020
{ text: '项目', link: '/projects/' },
21+
{ text: '排行榜', link: '/ranking/' },
2122
{ text: '路线图', link: '/roadmap/' },
2223
{ text: '规划', link: '/planning/' },
2324
{ text: '贡献', link: '/contributing/' },
@@ -36,6 +37,7 @@ export default defineProject({
3637
{ name: 'contributing', srcDir: 'contributing', urlPrefix: '/contributing' },
3738
{ name: 'workflow', srcDir: 'workflow', urlPrefix: '/workflow' },
3839
{ name: 'maintainers', srcDir: 'maintainers', urlPrefix: '/maintainers' },
40+
{ name: 'ranking', srcDir: 'ranking', urlPrefix: '/ranking' },
3941
],
4042
},
4143

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<script setup lang="ts">
2+
import { computed } from 'vue'
3+
import { useStars } from '../composables/useStars'
4+
5+
const { getStars } = useStars()
6+
7+
const repos = [
8+
'https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP',
9+
'https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_cpp_SimpleIniParser',
10+
'https://github.com/Awesome-Embedded-Learning-Studio/Project_MakeAMemroyPool',
11+
'https://github.com/Awesome-Embedded-Learning-Studio/CFBox',
12+
'https://github.com/Awesome-Embedded-Learning-Studio/Project_CXXBaseComponents',
13+
'https://github.com/Awesome-Embedded-Learning-Studio/edgecv',
14+
'https://github.com/Awesome-Embedded-Learning-Studio/imx-forge',
15+
'https://github.com/Awesome-Embedded-Learning-Studio/rk-forge',
16+
'https://github.com/Awesome-Embedded-Learning-Studio/PenguinLab',
17+
'https://github.com/Awesome-Embedded-Learning-Studio/ST-Forge',
18+
'https://github.com/Awesome-Embedded-Learning-Studio/BareMetal-Drivers',
19+
'https://github.com/Awesome-Embedded-Learning-Studio/Project_MicroWatch',
20+
'https://github.com/Awesome-Embedded-Learning-Studio/micro-forge',
21+
'https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_FreeRTOS',
22+
'https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_AwesomeQt',
23+
'https://github.com/Awesome-Embedded-Learning-Studio/CFDesktop',
24+
'https://github.com/Awesome-Embedded-Learning-Studio/qt-compile-pipeline',
25+
'https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_EmbeddedCommonTools',
26+
'https://github.com/Awesome-Embedded-Learning-Studio/Awesome-Embedded',
27+
]
28+
29+
const totalStars = computed(() => {
30+
let sum = 0
31+
for (const url of repos) {
32+
const s = getStars(url)
33+
if (s !== null) sum += s
34+
}
35+
return sum || null
36+
})
37+
38+
const stats = computed(() => [
39+
{ label: '公开仓库', value: '21' },
40+
{ label: '总 Stars', value: totalStars.value ?? '' },
41+
{ label: '主要语言', value: 'C · C++ · Shell · TS' },
42+
{ label: '贡献者', value: '3+' },
43+
])
44+
</script>
45+
46+
<template>
47+
<div class="org-stats">
48+
<div v-for="item in stats" :key="item.label" class="stat-item">
49+
<span class="stat-value">{{ item.value }}</span>
50+
<span class="stat-label">{{ item.label }}</span>
51+
</div>
52+
</div>
53+
</template>
54+
55+
<style scoped>
56+
.org-stats {
57+
display: grid;
58+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
59+
gap: 12px;
60+
margin: 1.5em 0;
61+
}
62+
63+
.stat-item {
64+
display: flex;
65+
flex-direction: column;
66+
align-items: center;
67+
padding: 20px 16px;
68+
border: 1px solid var(--vp-c-divider);
69+
border-radius: 12px;
70+
background-color: var(--vp-c-bg);
71+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
72+
}
73+
74+
.stat-item:hover {
75+
border-color: var(--vp-c-brand-1);
76+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
77+
}
78+
79+
.stat-value {
80+
font-size: 24px;
81+
font-weight: 700;
82+
color: var(--vp-c-text-1);
83+
line-height: 1.2;
84+
}
85+
86+
.stat-label {
87+
margin-top: 6px;
88+
font-size: 13px;
89+
color: var(--vp-c-text-3);
90+
font-weight: 500;
91+
}
92+
93+
@media (max-width: 639px) {
94+
.org-stats {
95+
grid-template-columns: repeat(2, 1fr);
96+
}
97+
98+
.stat-value {
99+
font-size: 20px;
100+
}
101+
}
102+
</style>

site/.vitepress/theme/components/ProjectCard.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
33
import { withBase } from 'vitepress'
4+
import { useStars } from '../composables/useStars'
45
56
const props = defineProps<{
67
name: string
@@ -12,6 +13,15 @@ const props = defineProps<{
1213
beginner?: boolean
1314
}>()
1415
16+
const { getStars } = useStars()
17+
const displayStars = computed(() => {
18+
if (props.repo) {
19+
const live = getStars(props.repo)
20+
if (live !== null) return live
21+
}
22+
return props.stars ?? null
23+
})
24+
1525
const statusConfig = computed(() => {
1626
const map = {
1727
active: { label: '活跃', cls: 'status-active' },
@@ -32,7 +42,7 @@ const resolvedLink = computed(() => {
3242
<component :is="resolvedLink ? 'a' : 'div'" :href="resolvedLink || undefined" class="project-card">
3343
<div class="card-header">
3444
<span class="card-title">{{ name }}</span>
35-
<span v-if="stars" class="card-stars">⭐ {{ stars }}</span>
45+
<span v-if="displayStars !== null" class="card-stars">⭐ {{ displayStars }}</span>
3646
</div>
3747
<div class="card-body">
3848
<p class="card-desc"><slot /></p>

0 commit comments

Comments
 (0)