CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
XCH.farm is a Jekyll static site serving as a resource hub for Chia cryptocurrency farming. It provides educational content, interactive calculators, and data visualizations. Deployed to GitHub Pages at xch.farm.
Build Commands
bundle install # Install Ruby dependencies
bundle exec jekyll serve --livereload # Local dev server with hot reload
bundle exec jekyll build # Production build to _site/
bundle exec jekyll clean # Remove _site/ and .jekyll-cache/
No test suite or linter is configured.
Architecture
Layout Pipeline
Every page uses layout: default which composes: top.html (head/opening body) → header.html (nav sidebar) → page content → footer.html → bottom.html (scripts/closing body).
Page Structure
Pages are standalone HTML files at the repo root with Jekyll front matter:
layout: default,title,permalinkare requiredjs_fileslists page-specific JS fromassets/js/pages/selected_categoriesfilters FAQ/glossary content on some pages
Key Directories
_data/— YAML data files driving navigation (navbar.yml), calculator presets (presets.yml), FAQ, glossary, and hero content_includes/— Reusable HTML partials (top, bottom, header, footer)assets/js/pages/— Page-specific JavaScript (calculators, charts, simulators)assets/js/data/— Auto-generated JSON data (daily-wins.js updated by CI)assets/libs/— Vendored client libraries (Chart.js, Choices.js, Toastify)_scripts/— Python scripts for fetching blockchain data from CoinSet/SpaceFarmers APIs. Scripts use only stdlib (urllib.request) — no external Python dependencies required.
Calculator/Tool Pattern
Each tool page (calculator, time-to-win, simulator, etc.) has a corresponding JS module in assets/js/pages/. Calculator presets are defined in _data/presets.yml. Chart pages use Chart.js for visualizations with data from assets/js/data/.
Styling
Bootstrap-based with custom CSS. Uses Remix Icon and Boxicons for icons.
CI/CD
GitHub Actions workflow (.github/workflows/weekly-netspace-update.yml) runs every Saturday:
- Executes
_scripts/update_daily_wins.pyto fetch blockchain data - Updates
assets/js/data/daily-wins.js - Creates a PR with the changes
Adding a New Page
- Create
your-page.htmlat repo root with proper front matter - Add page-specific JS to
assets/js/pages/if needed - Add entry to
_data/navbar.ymlin the appropriate section