This project allows you to display your Google Scholar citation metrics in a clean, responsive card via an iframe. It's ideal for embedding on academic or personal websites.
- Displays total and recent citations
- Shows research impact metrics (h-index)
- Modern, mobile-friendly design
- Easily embeddable via iframe
- No external dependencies beyond standard Python and browser JS
<iframe src="/scholar-box.html" width="100%" height="340" style="border: none;"></iframe>
How It Works:
- A Python script scrapes your Google Scholar profile.
- It generates a scholar-stats.json file with the key metrics.
- A styled scholar-box.html reads this JSON and displays it.
- This page can be embedded via iframe on any website.
git clone https://github.com/sjhilt/scholar-card.git
cd scholar-card
Use a virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Edit scholar_stats.py and replace:
USER_ID = 'YOUR_GOOGLE_SCHOLAR_ID'
Also edit in scholar-box.html
<a href="https://scholar.google.com/citations?user=YOUR_GOOGLE_SCHOLAR_ID" target="_blank">
python scholar_stats.py
You can test locally with:
python3 -m http.server
Or host it under /var/www/html/ for Apache/Nginx.
On your main website, embed the following:
<iframe src="/scholar-box.html" width="100%" height="360" style="border: none;"></iframe>
Automate Updates (Optional)
You can set up a cron job to refresh the data periodically.
crontab -e
Add this line (adjust paths as needed):
0 2 * * * /full/path/to/venv/bin/python /full/path/to/scholar_stats.py
This project is open-source and available under the MIT License.