CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
About
Personal academic website for Mingze Gao (mingze-gao.com), built with Quarto and published to GitHub Pages by pushing the rendered _site/ output to master.
Commands
When working on a file, only render/preview that specific file — never the full site:
quarto render path/to/file.qmd
quarto preview path/to/file.qmdA full quarto render is very costly and requires local data (e.g. ga-key.json). Do not run it unless explicitly asked.
Install Python dependencies:
pip install -r requirements.txt
pip install jupyterArchitecture
_quarto.yml— root project config: site metadata, navbar, sidebar, HTML theme, bibliography (references.bib), and a post-render hook (scripts/post-render.py)._brand.yml— Macquarie University brand colors (charcoal, red, sand-light) applied via thebrandtheme layer.scripts/post-render.py— runs after a full render; copiesspecurve/,data/,utils/,apps/directories andfavicon.icointo_site/. Only runs on full project renders (checksQUARTO_PROJECT_RENDER_ALL)._extensions/mgao6767/mq/— custom Quarto extension providing themq-revealjsformat (Macquarie-branded Reveal.js theme). Used by all lecture/workshop.qmdfiles viaformat: mq-revealjs._freeze/and.quarto/_freeze/— Quarto computation freeze cache. Frozen outputs avoid re-executing Python code on every render.
Content Structure
index.qmd— homepage with Google Analytics data visualisation (requiresga-key.jsonservice account key, which is not committed).cv/index.qmd,research/index.qmd,posts/,teaching/— main site sections matching the navbar.teaching/AFIN8003/<semester>/Week<N>/— lecture and workshop materials per week. Each lectureindex.qmdusesformat: mq-revealjs+format: pdf(outputsWeekN.pdf). The custompdf-namefield in YAML front matter is used by the teaching listing template (teaching/teaching.ejs) to link PDF downloads.posts/— blog posts;posts/_metadata.ymlsets shared defaults.
Deployment
The site is rendered locally and published by running quarto publish gh-pages --no-render. Do not rely on CI to render — always render locally first.
Notes
- The homepage (
index.qmd) will fail to render withoutga-key.json(Google Analytics service account). This file is intentionally excluded from the repo. - Lecture slides are dual-format:
mq-revealjsfor HTML presentation andpdffor a printable handout, rendered from the same.qmdsource. - The
teaching/teaching.ejstemplate drives the Teaching page listings, filtering lectures vs. workshops based on thepdf-namefield in YAML front matter.