Skip to content

Commit 09f698c

Browse files
committed
feat: contribution list and github stars via ci v2
1 parent 8f09a32 commit 09f698c

File tree

5 files changed

+407
-140
lines changed

5 files changed

+407
-140
lines changed

.github/workflows/deploy.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ jobs:
4242
${{ runner.os }}-pnpm-store-
4343
- name: Install dependencies
4444
run: pnpm install
45-
- name: Fetch plugins data
46-
run: node scripts/fetchPlugins.js
45+
- name: Run scripts
46+
run: |
47+
node scripts/fetchPlugins.js
48+
node scripts/fetchStars.js
49+
node scripts/contributor.js
50+
4751
- name: build
4852
run: pnpm run build
4953

src/components/HomePageHeader/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import clsx from 'clsx';
55
import Translate from '@docusaurus/Translate';
66
import Icon from '@site/src/components/Icon';
77
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
8-
8+
import data from '@site/static/data/stars.json';
99
import styles from './index.module.css';
1010

1111
const list = [
@@ -131,7 +131,7 @@ const HomeHead: FC = () => {
131131
>
132132
<Icon name="github" size="24px" className="me-2" />
133133
{` Star `}
134-
14k
134+
{numWord(data.stars)}
135135
</Button>
136136
</div>
137137
</Col>

src/pages/plugins.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Layout from '@theme/Layout';
66

77
import HeaderSlogan from '../components/HeaderSlogan';
88

9-
import pluginList from '../../static/data/plugin.json';
9+
import pluginList from '@site/static/data/plugin.json';
1010

1111

1212
export default function Plugins(): JSX.Element {

static/data/stars.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"stars": 13962
3+
}

0 commit comments

Comments
 (0)