CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a personal academic/professional website built with Quarto. The site showcases research, publications, open-source projects, teaching materials, and blog posts related to infectious disease modeling and epidemiological analytics.
The site is published at https://jamesmbaazam.github.io using GitHub Pages.
Tech Stack
- Quarto: Static site generator for the website
- R: Primary programming language for blog posts and computational content
- renv: R package dependency management
- GitHub Actions: CI/CD pipeline for automated publishing
Repository Structure
_quarto.yml: Main Quarto configuration fileindex.qmd: Homepageblog.qmd: Blog listing pageblog/: Individual blog posts (each in its own subdirectory withindex.qmd)blog/epinow2-eval-guide/: Guide on evaluating EpiNow2 model runsblog/julia-sugar-vs-r/: Comparison of Julia and R syntax
research_projects.qmd: Research and publications pageopensource_projects.qmd: Open-source projects pageteaching.qmd: Teaching materials pageimages/: Static images for the sitestyles.css: Custom CSS styles_extensions/: Quarto extensions (e.g., auto-dark mode)docs/: Output directory for rendered site (published to GitHub Pages)renv/: R package environment (managed by renv)renv.lock: Locked R package dependencies
Development Commands
Preview the website locally
quarto previewRender the entire website
quarto renderRender a specific page
quarto render index.qmd
quarto render blog/epinow2-eval-guide/index.qmdWorking with R dependencies
Initialize or restore R environment:
# In R console
renv::restore()Install new R packages:
# In R console
install.packages("package_name")
renv::snapshot() # Update renv.lock after installingBlog Post Structure
Blog posts are written in Quarto markdown (.qmd) files located in subdirectories under blog/. Each post typically includes:
- YAML frontmatter with metadata (title, author, date, categories, ORCID)
- R code chunks (often with caching enabled via
freeze: truefor computationally intensive content) - Categories include: forecasting, EpiNow2, Bayesian Analysis, Reproduction numbers, R, Stan, Julia
Blog posts often use R packages like: - EpiNow2 (epidemiological nowcasting/forecasting) - data.table, dplyr (data manipulation) - ggplot2 (visualization) - bayesplot, posterior (Bayesian analysis) - scoringutils (forecast evaluation)
Publishing Workflow
The site is automatically built and published to GitHub Pages on every push to main branch via .github/workflows/quarto-publish.yml. The workflow:
- Sets up Quarto (pre-release version)
- Sets up R
- Restores R environment using renv
- Installs system dependency (GLPK for igraph package)
- Renders and publishes to
gh-pagesbranch
Key Configuration Details
- Output directory:
docs/(configured in_quarto.yml) - R version: 4.5.1 (as specified in
renv.lock) - Theme: cosmo (light), darkly (dark mode)
- Auto-dark filter: Automatically switches between light/dark themes
- Site navigation: Top navbar with Home, Research, Open-source Projects, Teaching, Blog
- Social links: Twitter, GitHub, LinkedIn, Google Scholar, Email
Important Notes
- The site uses
renvfor R package management. Always runrenv::restore()when setting up a new environment. - Blog posts with computationally intensive code use
freeze: trueto cache results and avoid re-execution on every render. - The GitHub Actions workflow requires GLPK to be installed for the igraph R package dependency.
- The output directory is
docs/(not the default_site/), which is configured for GitHub Pages publishing.