CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

Aparajito Saha’s personal academic website — a Jekyll static site forked (and detached) from the AcademicPages template (itself derived from the Minimal Mistakes theme). It is hosted on GitHub Pages at https://aparajitosaha.github.io and builds automatically on push to main. There is no separate deploy step; pushing to main is the deploy.

Commands

Local preview (rebuilds and live-reloads on file changes):

bundle config set --local path 'vendor/bundle'   # first time; installs gems locally, avoids Bundler::PermissionError on system gem path
bundle install                       # if it errors, delete Gemfile.lock and retry
bundle exec jekyll serve -l -H localhost   # serves at localhost:4000

Docker alternative (no local Ruby needed):

docker build -t jekyll-site .
docker run -p 4000:4000 --rm -v $(pwd):/usr/src/app jekyll-site

JavaScript build (only when editing assets/js/): main.min.js is a hand-built concatenation of vendored libs + custom scripts. Regenerate it after JS changes:

npm install
npm run build:js     # uglifies vendored libs + assets/js/_main.js into assets/js/main.min.js
npm run watch:js     # rebuild on change

There is no test suite or linter.

Architecture

Content is data, not code. Pages are generated by Jekyll from Markdown/HTML front matter plus YAML config — editing content rarely means touching theme logic.

  • _config.yml is the control center: site metadata, the author sidebar profile (social links, employer, avatar), publication_category headings, and the collections + defaults blocks that define how each content type is rendered. Jekyll does not hot-reload this file — restart jekyll serve after changing it.

  • The site is a single page. _pages/about.md (layout: home_layouts/home.html) renders the bio, then one section per collection: Publications, Teaching, Projects. _includes/home-section.html builds a section (grouping publications under the publication_category headings), and _includes/home-item.html renders one item. Sections carry the #about, #publications, #teaching and #projects anchors the nav bar jumps to.

  • Collections (_publications/, _portfolio/, _teaching/, plus _posts/): each .md file is one item, rendered inline on the homepage. Front matter (title, venue, date, category, type, paperurl/slidesurl/websiteurl, citation) drives the title, meta line and links; the Markdown body is shown in full, with its headings shifted down so they nest under the section. These three collections are output: false, so items have no page of their own and the permalink in their front matter is inert. A publication whose category is not in publication_category is silently left out. Add content by adding a file, not by editing templates.

  • _pages/: about.md is the homepage. publications.html, teaching.html and portfolio.html are redirect stubs (redirect_to an anchor, via jekyll-redirect-from) that keep the old section URLs working; plus 404.md.

  • _data/: navigation.yml defines the top nav menu — the section links are /#anchor URLs into the homepage, CV is a direct link to the PDF; authors.yml and ui-text.yml hold author and UI string data.

  • _layouts/ (page skeletons: home, single, archive, talk, splash, …) compose _includes/ (reusable partials: author-profile.html, masthead.html, seo.html, the home-* fragments, etc.). _sass/ holds styles compiled into assets/css/; the single-page styles are in _sass/_home.scss. Edit these only for theme/structural changes.

  • files/ holds downloadable assets served at /files/... (e.g. AparajitoSaha_CV.pdf); images/ holds site images (avatar, etc.).

Generating publications and talks

markdown_generator/ converts TSV spreadsheets into collection Markdown files. Edit publications.tsv / talks.tsv, then run the script (or notebook) to emit one .md per row into the corresponding collection:

cd markdown_generator && python publications.py   # or talks.py; .ipynb notebooks do the same with docs

talkmap.py / talkmap.ipynb scrape location front matter from talk files to build a Leaflet cluster map (requires getorg, geopy).

Conventions

  • Collection filenames follow YYYY-MM-DD-slug.md; the date and permalink in front matter determine the public URL.
  • This is a detached fork of a template. Many sample files (e.g. _publications/2009-...-paper-title-number-1.md, the README’s “Getting Started” section) are upstream placeholders — real content has been swapped in over them. Pulling upstream template changes will conflict; patch manually rather than syncing.