OSFarm

CLAUDE.md

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

Project

OSFarm is a static Jekyll site showcasing open source projects and communities in farming/agriculture. It is multilingual (EN/FR) and hosted on GitHub Pages.

Commands

Setup

script/bootstrap      # Install Ruby gems via bundler
# Or manually: sudo gem install bundler jekyll && bundle install

Development

script/server         # Start dev server with watch mode at http://localhost:4000
# Equivalent: bundle exec jekyll serve -w

Build

script/build          # Production build (runs npm install + jekyll build)

Tests & Validation (CI)

script/cibuild              # Full CI: build + all validations (what GitHub Actions runs)
bundle exec rake test       # HTML link validation via html-proofer
bundle exec rubocop -D -S   # Ruby style checks
bundle exec script/ensure-orgs    # Verify all orgs exist on GitHub (uses GITHUB_TOKEN)
bundle exec script/ensure-unique  # Check for duplicate entries in data files
script/alphabetize          # Sort YAML data files alphabetically

Architecture

Data-Driven Content

All structured content lives in _data/ as YAML files — this is the primary source of truth for the site. Pages use Liquid templates to render from these files. When adding/editing projects, organizations, people, etc., edit the relevant YAML file.

Key data files:

After editing YAML, run script/alphabetize to keep files sorted consistently.

Multilingual Setup

The site uses jekyll-polyglot for EN/FR support. Layouts are duplicated per language:

The fr/ directory contains French-language pages; index.html and other root pages are English.

Layout & Includes

Styling

Data Validation

The script/ directory contains Ruby validation scripts run in CI:

Generated output goes to _site/ (git-ignored); GitHub Pages builds automatically on push to main.