Skip to content

Commit b5c3fa6

Browse files
committed
Initial commit: academic homepage
0 parents  commit b5c3fa6

15 files changed

Lines changed: 933 additions & 0 deletions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Scholar Stats
2+
3+
on:
4+
schedule:
5+
# Every day at 00:00 UTC (08:00 Beijing time)
6+
- cron: '0 0 * * *'
7+
workflow_dispatch: # Allow manual trigger from GitHub UI
8+
push:
9+
paths:
10+
- 'update-scholar.py'
11+
- '.github/workflows/update-scholar.yml'
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
update:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.11'
27+
28+
- name: Fetch scholar stats
29+
run: python update-scholar.py
30+
31+
- name: Commit & push if changed
32+
run: |
33+
git config user.name "github-actions[bot]"
34+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
35+
if git diff --quiet scholar.json; then
36+
echo "No changes to scholar.json"
37+
else
38+
git add scholar.json
39+
git commit -m "chore: update scholar stats [skip ci]"
40+
git push
41+
fi

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# OS
2+
.DS_Store
3+
Thumbs.db
4+
5+
# Editor
6+
.idea/
7+
.vscode/
8+
*.swp
9+
*~
10+
11+
# Python
12+
__pycache__/
13+
*.pyc
14+
.venv/
15+
venv/
16+
17+
# Private documents (not to be published)
18+
塔塔网申.pdf
19+
*.draft.*
20+
21+
# Temporary
22+
paper_pdfs/
23+
paper_pdfs_tmp/
24+
*.log

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Zongying Lin — Academic Homepage
2+
3+
> Personal academic homepage of **Zongying Lin (林宗莹)**, M.S. student at Peking University.
4+
> Style inspired by [shaodong233.github.io](https://shaodong233.github.io/) (Minimal Mistakes theme).
5+
> Live at: **<https://linzongying.github.io>** <!-- change to your actual URL -->
6+
7+
![screenshot](paper_thumbs/taxdiff.png)
8+
9+
## ✨ Features
10+
11+
- 🎨 **Minimal-Mistakes-inspired typography** — PT Serif + PT Sans Narrow
12+
- 🌐 **Bilingual (English / 中文)** — one-click toggle, persisted in localStorage
13+
- 📊 **Live Google Scholar stats** — citations, h-index, i10-index auto-refreshed **daily** via GitHub Actions
14+
- 💬 **WeChat modal** — click-to-reveal ID with one-tap copy
15+
- 📱 **Responsive** — mobile / tablet / desktop
16+
-**Accessible** — semantic HTML, focus-visible, skip-link, aria labels
17+
- 🚀 **Static site** — no build step; works on plain GitHub Pages
18+
19+
## 🔧 How it works
20+
21+
### Live Scholar Stats
22+
23+
1. [`update-scholar.py`](./update-scholar.py) — Python script that fetches your Scholar profile page and parses the stats table into `scholar.json`.
24+
2. [`.github/workflows/update-scholar.yml`](./.github/workflows/update-scholar.yml) — GitHub Actions workflow that runs the script **daily at 00:00 UTC (08:00 Beijing)** and auto-commits any changes.
25+
3. **Front-end**`index.html` fetches `scholar.json` on page load and animates the numbers into the stats cells. Silently falls back to cached values if the file is unreachable.
26+
27+
### Manual refresh
28+
29+
```bash
30+
python3 update-scholar.py
31+
```
32+
33+
Or trigger from GitHub: **Actions → Update Scholar Stats → Run workflow**.
34+
35+
### Required GitHub settings
36+
37+
For the Action to push back to the repo, go to:
38+
**Settings → Actions → General → Workflow permissions → Read and write permissions**
39+
40+
## 🗂️ File Structure
41+
42+
```
43+
.
44+
├── index.html # The homepage
45+
├── avatar.jpg # Circular bio photo (400×400)
46+
├── portrait.jpg # Article portrait (600×800)
47+
├── scholar.json # Auto-updated Scholar metrics
48+
├── update-scholar.py # Scholar fetcher script
49+
├── paper_thumbs/ # Publication thumbnails
50+
│ ├── taxdiff.png
51+
│ ├── prollama.png
52+
│ ├── multi_transsp.png
53+
│ ├── chemling.png
54+
│ ├── mg_score.png
55+
│ └── casa.png
56+
├── 林宗莹-北京大学-计算机应用技术-硕士.pdf # CV (optional)
57+
└── .github/workflows/
58+
└── update-scholar.yml # Daily cron
59+
```
60+
61+
## 🚀 Deploy to GitHub Pages
62+
63+
### Option A — User site (recommended)
64+
65+
1. Create a new public repo on GitHub named exactly **`<your-username>.github.io`**.
66+
2. Push this directory:
67+
```bash
68+
git remote add origin https://github.com/<your-username>/<your-username>.github.io.git
69+
git push -u origin main
70+
```
71+
3. Settings → Pages → Source = **Deploy from a branch** → Branch = **main** / **root** → Save.
72+
4. Visit `https://<your-username>.github.io` (may take 1–2 minutes on first deploy).
73+
74+
### Option B — Project site
75+
76+
1. Create any public repo (e.g. `academic-homepage`).
77+
2. Push and enable Pages as above.
78+
3. Visit `https://<your-username>.github.io/academic-homepage/`.
79+
80+
## 🎨 Customize for Your Own Use
81+
82+
Fork this repo and edit:
83+
84+
| What | Where |
85+
|---|---|
86+
| Name / bio / contact | `index.html` — Hero + About Me sections |
87+
| Photos | Replace `avatar.jpg` and `portrait.jpg` |
88+
| Publications | `index.html``<article class="paper-item">` blocks + `paper_thumbs/*.png` |
89+
| Education / Experience / Awards | `index.html` — corresponding sections |
90+
| Google Scholar user ID | `update-scholar.py``USER = 'your-scholar-id'` |
91+
92+
## 📜 License
93+
94+
Content (text, photos, publications) © Zongying Lin.
95+
Template structure inspired by [Minimal Mistakes](https://mademistakes.com/) — feel free to reuse the layout/CSS for your own academic homepage.

avatar.jpg

17.1 KB
Loading

0 commit comments

Comments
 (0)