CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repo is
This is imamtom.github.io β a Jekyll-based personal academic homepage for Li Wenjie (PhD student, Xidian University, researching cryptography / privacy-preserving federated learning). It is a fork of RayeRen/acad-homepage.github.io, which itself derives from mmistakes/minimal-mistakes and academicpages.
The site is dual-page, single-language-sectioned: the English homepage at / lives in _pages/about.md (frontmatter permalink: /, redirect_from: /about/, /about.html); the Chinese homepage at /zh/ lives in _pages/about-zh.md (frontmatter permalink: /zh/, author: zh to pull the Chinese sidebar profile from _data/authors.yml). Both files share the masthead, sidebar, scripts, and the `
` block.
Common commands
- Install dependencies (Ruby gems for Jekyll):
bundle install - Run local dev server with live reload at http://127.0.0.1:4000:
bash run_server.sh(this first re-runsbibtex_build/render.sh, thenbundle exec jekyll serve) - One-off build without serving:
bundle exec jekyll build - Re-render the Publications block after editing
_data/ref.bibtex:bash bibtex_build/render.sh
The Python crawler has its own dependencies (scholarly, jsonpickle); install with pip install -r google_scholar_crawler/requirements.txt.
There are no tests, lint configs, or CI workflows beyond the Google Scholar crawler and the locally-run bibtex render.
Architecture overview
Content layer
_pages/about.mdβ English homepage. Sections are anchored (#about-me,#-news,#-publications,#-honors-and-awards,#-educations,#-internships) and those IDs must stay in sync with_data/navigation.yml. The Publications section is rendered via `
`.
_pages/about-zh.mdβ Chinese homepage. Mirror ofabout.mdwithpermalink: /zh/andauthor: zh._data/navigation.ymlβ masthead menu items. The first two entries are the language toggle:English β /andπ¨π³ δΈζ β /zh/. The rest are anchor links._data/authors.ymlβ author profiles keyed bypage.author. The English page usessite.authorfrom_config.yml; the Chinese page uses thezh:block here._data/ref.bibtexβ single source of truth for publications. Order in the file is preserved by pandoc (newest first). Each entry is one paper._pages/about.md/_pages/about-zh.mdallow inline HTML + Markdown. The paper-citation inline widget is<span class='show_paper_citations' data='GOOGLE_SCHOLAR_PAPER_ID'></span>; the paper ID is the segment aftercitation_for_view=in a Google Scholar citation URL.
Template layer
_layouts/default.htmlβ single layout used by all pages (defaults:in_config.ymlforceslayout: default,author_profile: true)._includes/head.html+head/custom.htmlβ meta, CSS link, favicons, MathJax (LaTeX), academicons CSS.masthead.htmlβ top nav (renders_data/navigation.yml). Adds.masthead__menu-item--activeto the entry whoselink.urlmatchespage.urlso the current language toggle is highlighted.sidebar.html+author-profile.htmlβ left sidebar with avatar, bio, and ~30 social/profile links rendered conditionally fromsite.author.*keys (orpage.authorfrom_data/authors.yml).scripts.htmlβ loadsmain.min.js, Google Analytics, andfetch_google_scholar_stats.html.fetch_google_scholar_stats.htmlβ client-side jQuery script that fetchesgs_data.jsonfrom thegoogle-scholar-statsbranch and fills#total_cit+ every.show_paper_citationselement.publications.htmlβ generated, do not edit by hand. Re-rendered from_data/ref.bibtexbybibtex_build/render.sh.
Asset paths in _includes/ use relative_url (e.g. href="/assets/css/main.css") because the Chinese homepage lives at /zh/ and bare assets/... URLs would otherwise resolve to /zh/assets/... which doesnβt exist. Keep this convention when adding new includes.
Style layer
assets/css/main.scssis the entry; it imports_sass/*.scss(variables, base, navigation, page, sidebar, masthead, footer, etc.) plus vendored libraries under_sass/vendor/(breakpoint, susy, font-awesome, magnific-popup).- Custom rules at the bottom of
main.scss:.paper-box/.badge/.anchorβ the optional image+text card used in the commented-out Publications example..masthead__menu-item--active > aβ bold + blue (#00369f) underline for the current language toggle..publications .csl-entryβ hanging-indent layout for the GB/T 7714 bibliography.
Publications pipeline (BibTeX β GB/T 7714)
- User maintains
_data/ref.bibtex(one@article{...}per paper, withauthor,title,journal,year,url). bibtex_build/render.shrunspandoc --citeproc --bibliography=_data/ref.bibtex --csl=bibtex_build/china-national-standard-gb-t-7714-2015-numeric.csland pipes the output (a<div id="refs" class="references csl-bib-body">β¦</div>fragment) into_includes/publications.htmlwrapped in<div class="publications">.- The
<!-- This file is auto-generated -->comment marks the include as generated. Do not edit it by hand β edits will be overwritten the next timerender.shexecutes. - The CSL file lives at
bibtex_build/china-national-standard-gb-t-7714-2015-numeric.csl(downloaded from the citation-style-language/styles repo; commits should keep it in sync if upstream changes). run_server.shcallsbibtex_build/render.shbefore starting Jekyll, so editing_data/ref.bibtexand re-saving β re-render β live server refresh.
Dependency: requires pandoc β₯ 2.11 (with --citeproc). The render script errors out clearly if pandoc is missing. GitHub Pages itself does not run this script β it uses the committed _includes/publications.html. So commit both _data/ref.bibtex and _includes/publications.html together whenever the bibliography changes.
Citation auto-update pipeline (Google Scholar)
A scheduled GitHub Action in .github/workflows/google_scholar_crawler.yaml runs:
- Trigger: every day at 08:00 UTC (
cron: '0 8 * * *') AND on everypage_build. - Step:
python3 google_scholar_crawler/main.pyreadsGOOGLE_SCHOLAR_IDfrom repo secrets, calls thescholarlylibrary, and writesgs_data.json(full author record) andgs_data_shieldsio.json(just the citation count, shields.io-compatible). - Output: force-pushes the two JSON files to a branch called
google-scholar-stats. - Consumed by:
_includes/fetch_google_scholar_stats.html(page-load) and the shields.io badge in_pages/about.mdand_pages/about-zh.md(theimg.shields.io/endpoint?url=...gs_data_shieldsio.json...image).
CDN switch: _config.yml key google_scholar_stats_use_cdn toggles between cdn.jsdelivr.net/gh/<repo>@ and raw.githubusercontent.com/<repo>/ for both consumers. true is friendlier from mainland China but adds jsdelivr cache delay.
Misc
_config.ymlauthor.*is the single source of truth for sidebar/profile links on the English page; most keys are optional and conditionally rendered.Gemfilepinsgithub-pagesgem group (so local build matches GitHub Pagesβ pinned plugin versions). Plugins enabled:jekyll-paginate,jekyll-sitemap,jekyll-gist,jekyll-feed,jekyll-redirect-from. Thewdmgem is NOT included (incompatible with Ruby 3.x); Jekyll on Windows falls back to polling for file-change events.tzinfo-datais included sotzinfo2.x finds timezone data on Windows.assets/fonts/ships Font Awesome + academicons as static assets (no CDN).images/holds favicons + avatar (android-chrome-512x512.png).- The actual Ruby is at
/d/Ruby33-x64/bin/on this machine. The Microsoft Store shim at/c/Users/imlee/AppData/Local/Microsoft/WindowsApps/{bundle,bundler,ruby}is broken (points to a non-existentruby.exe) βrun_server.shprepends/d/Ruby33-x64/bintoPATHto avoid it.
Things to know before editing
_config.ymlis NOT auto-reloaded byjekyll serveβ restart the server after config edits.- Anchor IDs in
_pages/about.mduse the kramdown-auto-generated form (e.g.π₯ Newsβ#-newsbecause emoji is stripped). If you rename a heading, update the matching entry in_data/navigation.yml. - The crawler writes to a separate branch (
google-scholar-stats); the action uses--forcepush. Donβt runmain.pyagainst your local checkout expecting the output to land onmain. - The Chinese page (
/zh/) requires asset URLs to userelative_url(or absolute/assets/...); bareassets/...will 404. This is already fixed in_includes/, but watch for it when adding new templates. _includes/publications.htmlis auto-generated β edit_data/ref.bibtexand runbash bibtex_build/render.shinstead.- There is no automated test or build check beyond GitHub Pagesβ own Jekyll build β the deploy is implicit on push to
main.