Personal project
Hugo + Toha · Chinese / English / French
A Hugo-powered trilingual static site: a data-driven homepage, an academic archive where courses link to projects and competitions, project and competition detail pages, giscus comments, reading-progress and scroll motion, and a /cv/ generator that turns homepage data into an A4 PDF.
A template site can host a résumé, but I wanted content and layout fully separated: the same education, project and competition data should drive the homepage, the academic archive, the CV and the blog at once. Only your own build can do that.
The site started in April 2024 with a simple theme, later moved to Toha, and gradually turned the homepage, project pages, competition pages and the academic archive into data-driven layouts. Today it is a trilingual, backend-free portfolio that can be read end to end on a phone.
Rather than a wall of cards, the homepage follows a deliberate reading order: about → skills → experience → education → projects → competitions → links. Each section stands on its own, but read in sequence they form a complete introduction. Sections are ordered by a weight field, so rearranging them means changing a number.
Projects, competitions and the academic archive all use a list page plus detail pages:
Visitors always know where they are and where they can go next.
Colours, type sizes and spacing are shared across the site: ruled section headings, right-aligned dates with tabular numerals, subtle hover movement on cards. Dark mode is not a naive inversion — it redefines a set of CSS variables for overlays, text and borders separately.
layouts/ overrides for projects, competitions, the academic archive and the CV page;data/ as YAML; templates only compose them;The direct benefit: adding a course, a project or a photo is a data change, never a template change.
Each university has a complete course archive:
#course-UR06), so project pages can link straight to a course;Every project page includes the course and period, my role, repository links (public repos are linked directly; the source repo stays private), related articles, related skills and a comment section. Related articles tie the technical write-ups of one project together.
Competition pages emphasise results: awards, period and role at the top, followed by the background and my part, plus a certificate gallery where images open full size. Related articles appear at the bottom.
The homepage links section gathers GitHub, Gitee, CSDN, LeetCode, Luogu and LinkedIn. Contribution heatmaps and a recent-activity timeline show what I have been doing lately, rather than only static résumé entries.
Small details that keep reading comfortable:
IntersectionObserver, and the system’s “reduce motion” preference disables all of it;A purely static site has no server, so comments live in GitHub Discussions: giscus loads a single iframe. The comment theme follows the site’s light/dark switch, and posts, projects and competitions all accept comments.
/cv/ is the heaviest page on the site: pick a language and entries, watch a paginated A4 preview, and export a clickable PDF. All content comes from the homepage YAML, and English/French versions automatically point internal links at the matching language pages. Implementation notes are in this article.
The site exists in Chinese, English and French: translations sit side by side as *.en.md / *.fr.md, data lives under data/<lang>/, and Chinese-only navigation entries are labelled (Chinese) / (Chinois). First visits redirect by browser language — deliberately not by IP, because VPNs and travel make IPs lie.
Publishing splits across two repositories:
publish.ps1 rebuilds, squashes everything into a single commit and force-pushes.The source repository is not public, but the published output and the comment data are:
Drafts and scripts never reach the public GitHub Pages repo, while source history stays complete.
The main lesson is that every convenient feature rests on disciplined data structures. Had the homepage been written as long HTML blocks, neither the academic cross-links, the CV generator nor the trilingual pages would exist.
The other lesson is engineering hygiene: build and deploy scripts, asset fingerprinting, and encoding pitfalls (Windows consoles, PowerShell, colons and ampersands in YAML) — each one recorded, and most written up as articles on this very site.
The site keeps growing: Chinese-aware full-text search, more CV layout templates, and yearly reading logs turned into a browsable timeline.