mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
2.7 KiB
2.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is the source for commonflow.org, an Astro-based static site that documents the Git Common-Flow specification. Common-Flow is a git workflow specification that combines GitHub Flow with versioned releases.
Build Commands
# Install tooling (bun) via mise
mise install
# Install dependencies
bun install
# Development server
bun run dev
# Build site (outputs to docs/ directory)
bun run build
# Preview built site
bun run preview
# Type checking
bun run check
# Linting
bun run lint
# Formatting
bun run format
bun run format:check
# Update specs from upstream (fetches from github.com/jimeh/common-flow)
bun run update-specs
The site is built to docs/ for GitHub Pages hosting.
Architecture
- Astro 5.x static site generator
- Tailwind CSS 4.x for styling with dark mode support
- astro-icon with Heroicons and Simple Icons for icons
- Content Collections for spec markdown files
- TypeScript throughout
- Bun as JavaScript runtime and package manager (managed via mise)
Key Files
src/config.ts- Site configuration with version listsrc/content.config.ts- Astro content collection definitionsrc/layouts/BaseLayout.astro- Base layout with head, meta tags, theme scriptssrc/layouts/SpecLayout.astro- Spec page layout composing all sectionssrc/components/- UI components:Header.astro- Site header with navigationFooter.astro- Site footerHero.astro- Landing page hero sectionAboutSection.astro- About Common-Flow sectionFAQSection.astro- FAQ sectionSectionHeader.astro- Reusable section header (title + subtitle)SpecSection.astro- Spec section with terminology and specificationSpecSidebar.astro- Spec page table of contents sidebarTocLink.astro- Reusable TOC link componentThemeToggle.astro- Dark/light mode toggleVersionSelector.astro- Spec version dropdown
src/scripts/activeSectionTracker.ts- Shared scroll-based active section trackingsrc/pages/index.astro- Landing pagesrc/pages/404.astro- 404 error pagesrc/pages/spec/[version].astro- Dynamic route for spec versionssrc/utils/parseSpecContent.ts- Markdown parsing utilitiessrc/content/spec/*.md- Versioned spec documentspublic/spec/*.svg- SVG diagrams for each versionscripts/update-specs.ts- Fetches specs from GitHub
Updating Spec Versions
- Add new version to
versionsarray insrc/config.ts - Update
currentVersionif this is the new default - Run
bun run updateto fetch specs from GitHub - Run
bun run buildto rebuild the site