CLAUDE.md

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

Project Overview

Personal academic portfolio website for Elías Cisneros (Assistant Professor, UT Dallas). Built with Jekyll using the Minimal Mistakes remote theme (mmistakes/minimal-mistakes, skin: contrast). Deployed via GitHub Pages at https://eliascis.github.io.

Ruby Setup

Ruby is managed via rbenv and is an x86_64 (Rosetta) build linked against the x86_64 Homebrew libraries in /usr/local/opt. An arm64 Homebrew also exists at /opt/homebrew and comes first on PATH.

Xcode 26 clang is arm64-only: bake -arch x86_64 into CC

Xcode 26 ships Apple clang 21 as an arm64-only binary that defaults to an arm64 target, and arch -x86_64 cannot change that — there is no x86_64 clang slice to select. So the arch must be passed explicitly. Putting it in CC/CXX when building Ruby records it in RbConfig (CC, LDSHARED), which mkmf reuses, so native gems (json, bigdecimal, eventmachine, http_parser.rb) then compile as x86_64 with no per-gem flags:

arch -x86_64 env PATH="/usr/local/bin:$PATH" \
  CC="clang -arch x86_64" CXX="clang++ -arch x86_64" \
  RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl@3 --with-libyaml-dir=/usr/local/opt/libyaml --with-gmp-dir=/usr/local/opt/gmp --with-ext=openssl,psych,+" \
  /opt/homebrew/bin/ruby-build 3.4.12 ~/.rbenv/versions/3.4.12
rbenv rehash && rbenv local 3.4.12
gem install bundler -v "$(tail -1 Gemfile.lock | tr -d ' ')"
bundle install

/usr/local/bin goes first so brew resolves to the x86_64 libraries, but ruby-build is called by its /opt/homebrew path because the /usr/local copy is older and lacks recent definitions (rbenv install would pick that stale one up from the reordered PATH). Verify with file ~/.rbenv/versions/<v>/bin/ruby and file <gem>/…/*.bundle — both must report x86_64.

A Ruby built with plain CC=clang (as 3.3.10 was) leaves every mkmf have_func probe failing to link the x86_64 libruby dylib; gems then compile their old-Ruby/TruffleRuby fallback shims and die with errors like static declaration of 'rb_hash_bulk_insert' follows non-static declaration. The tell is required architecture 'arm64' in the gem’s mkmf.log. Rebuild Ruby as above; a one-off per-gem workaround is BUNDLE_BUILD__JSON='--with-arch-flag="-arch x86_64"' bundle update json --conservative. The other durable alternative is an arm64-native Ruby, which means adding arm64-darwin platform gems (e.g. sass-embedded) and dropping the x86_64 Homebrew.

.ruby-version must be a current patch release

The .ruby-version file (set to 3.4.12) is committed, not gitignored — .github/workflows/build.yml reads it via ruby-version: .ruby-version, so removing or ignoring it breaks CI. CI runs on ubuntu-latest, and ruby/setup-ruby only builds the latest patch of each series for a newly introduced runner image. So when ubuntu-latest moves to a new image, a pinned older patch becomes unavailable and CI fails at “Set up Ruby” with a 404 until .ruby-version is bumped (this happened to 3.3.10 when ubuntu-latest moved to 26.04 in Nov 2026).

Series end-of-life dates are listed at https://www.ruby-lang.org/en/downloads/branches/ (3.3 ends 2027-03-31; 3.4 was in normal maintenance as of Nov 2026). To test a new Ruby before switching, build the site under both versions into scratch directories (RBENV_VERSION=<v> bundle exec jekyll build -d <dir>) and diff -rq them; only the <updated> timestamp in feed.xml should differ.

Development Commands

# Local development server
bundle exec jekyll serve

# Build site (output to _site/)
bundle exec jekyll build

# Minify JavaScript (only needed if modifying JS assets)
npm run build:js

# Watch JS for changes
npm run watch:js

Note: _config.yml is NOT auto-reloaded by jekyll serve — restart the server after config changes.

Architecture

Key Configuration

All in _config.yml:

Content Conventions