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.ymlis the control center: site metadata, the author sidebar profile (social links, employer, avatar),publication_categoryheadings, and thecollections+defaultsblocks that define how each content type is rendered. Jekyll does not hot-reload this file — restartjekyll serveafter 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.htmlbuilds a section (grouping publications under thepublication_categoryheadings), and_includes/home-item.htmlrenders one item. Sections carry the#about,#publications,#teachingand#projectsanchors the nav bar jumps to.Collections (
_publications/,_portfolio/,_teaching/, plus_posts/): each.mdfile 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 areoutput: false, so items have no page of their own and thepermalinkin their front matter is inert. A publication whosecategoryis not inpublication_categoryis silently left out. Add content by adding a file, not by editing templates._pages/:about.mdis the homepage.publications.html,teaching.htmlandportfolio.htmlare redirect stubs (redirect_toan anchor, viajekyll-redirect-from) that keep the old section URLs working; plus404.md._data/:navigation.ymldefines the top nav menu — the section links are/#anchorURLs into the homepage, CV is a direct link to the PDF;authors.ymlandui-text.ymlhold author and UI string data._layouts/(page skeletons:home,single,archive,talk,splash, …) compose_includes/(reusable partials:author-profile.html,masthead.html,seo.html, thehome-*fragments, etc.)._sass/holds styles compiled intoassets/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 andpermalinkin 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.
