This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a personal blog built with Jekyll using the Henry theme, hosted on GitHub Pages. It contains:
- A Jekyll-based blog with posts in
_posts/ - A standalone Calorie Counter web app in
cc/
docker-compose upAccess at http://0.0.0.0:4000/ (Mac) or http://localhost:4000/ (Windows)
bundle install
bundle exec jekyll serve -wIlo --draftsRequires Ruby 3.0.0 and Bundler.
Open cc/index.html directly in a browser - no server required.
Run tests by opening cc/tests.html in a browser (Jasmine test runner). Tests use testClock to mock time for day rollover and calendar logic.
_config.yml- Site configuration (title, author, theme settings). Restart server after changes._posts/- Published blog posts in markdown_drafts/- Draft posts (visible with--draftsflag)_layouts/- Page templates (default, post, page, index)_includes/- Reusable HTML components (header, footer, head)_sass/- SCSS stylesheets with override files (theme_override.scss,main_override.scss)
A vanilla JavaScript app with no dependencies:
script.js- Main application logic with state management using localStoragetests.js- Jasmine unit tests with time mocking viatestClock- State object tracks: BMR, manual calorie adjustments, daily history, theme mode, calorie log
Key patterns in cc/script.js:
- State persistence via
loadState()/saveState()to localStorage - Day rollover handled by
checkDayReset()andprocessMissedDays() - Date formatting uses
formatDateKey()for YYYY-MM-DD keys - Calorie calculations: BMR-based burn rate, net calories = manualCalories - caloriesBurned