This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the documentation site for RVM (Ruby Version Manager), built with Nanoc 3.8.0 (static site generator). Content is written in Markdown and HAML, compiled to static HTML, and output to public/.
# Install dependencies
bundle install
# Local development (two terminals)
guard # Terminal 1: watches files and recompiles on change
nanoc view # Terminal 2: serves site at http://localhost:3000
# Build site
rake compile # Compiles to public/
# Run all checks (compile + stale links + internal links + SSL cert check)
rake test
# Individual checks
rake check_stale # Find stale output files
rake check_internal_links # Validate internal links
rake check_ssl # Verify rvm.io SSL certificate expiryRequires Ruby 3.4.5 (see .ruby-version). Uses RVM gemset rvm-site.
Use Conventional Commits for commit messages (e.g. docs:, fix:, chore:, feat:).
The Rules file defines compilation and routing:
- Markdown (
.md): processed throughrdiscount→auto_ids→pre_codefilters, then wrapped indefaultlayout - HAML (
.haml): processed throughhamlfilter, then wrapped indefaultlayout - Blog posts (
content/blog/YYYY-MM-DD-slug.md): usebloglayout, routed to/blog/YYYY/MM/slug/ - SCSS (
content/assets/css/): compiled via Compass/Sass, partials (prefixed_) are excluded from output - Static assets: images and JS copied as-is
PreCodeFilter(:pre_code): transforms<pre><code>blocks into styled<pre class="code">elementsAutoIdsFilter(:auto_ids): auto-generates anchor links for h1/h2/h3 headings
During preprocessing, AutoHelper scans all items for tags and author metadata, then generates tag/author listing pages and Atom feeds from templates in layouts/templates/.
content/— all site content (markdown docs, blog posts, assets)content/blog/— blog posts, namedYYYY-MM-DD-slug.mdwith YAML front matter (title,author,author_full,tags,created_at)layouts/— HAML templates;default.hamlis the main layout,blog.hamlfor postslayouts/shared/— partials (header, footer, navigation menus)layouts/templates/— ERB templates for auto-generated tag/author pages and feedslib/— Ruby helpers and custom Nanoc filterslib/tasks/— Rake tasks loaded byRakefilepublic/— compiled output (gitignored)
Documentation pages use YAML front matter. Blog posts require: title, author, author_full, tags (array), created_at (date string).
blog.rb— blog listing, sorting, tag/author filteringcode_helper.rb— code block rendering and menu generationbreadcrumbs_helper.rb— breadcrumb navigationhelpers.rb— standard Nanoc3 helper includes