|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +CalConnect DEVGUIDE is a Jekyll-based static site providing a developer's guide for calendaring and scheduling standards (iCalendar, CalDAV, CardDAV, vCard, jsCalendar, iTIP, iMIP). The live site is at https://devguide.calconnect.org. |
| 8 | + |
| 9 | +Uses the shared `calconnect-theme` gem for layouts, includes, and design tokens. The theme provides Tailwind CSS v4 via Vite, dark mode support, and documentation sidebar styling. |
| 10 | + |
| 11 | +## Build & Serve Commands |
| 12 | + |
| 13 | +- **Install dependencies:** `bundle install && npm ci` |
| 14 | +- **Build the site:** `bundle exec jekyll build` |
| 15 | +- **Local dev server:** `bundle exec jekyll serve` |
| 16 | +- **Build for production:** `JEKYLL_ENV=production bundle exec jekyll build` |
| 17 | + |
| 18 | +Ruby 3.2, Node.js 24. Jekyll 4.3 with jekyll-vite plugin. |
| 19 | + |
| 20 | +## Deployment |
| 21 | + |
| 22 | +- **GitHub Actions** builds and deploys to GitHub Pages on push to `master` |
| 23 | +- **Firebase** hosting config exists in `firebase.json` (redirect rules) |
| 24 | +- The `_site/` directory is the build output (gitignored) |
| 25 | + |
| 26 | +## Site Architecture |
| 27 | + |
| 28 | +### Theme |
| 29 | + |
| 30 | +Uses `calconnect-theme` gem (at `../calconnect-theme/`). The theme provides: |
| 31 | +- **Layouts**: `base` (HTML shell), `default` (documentation sidebar), `page` (simple wrapper) |
| 32 | +- **Includes**: `head.html` (fonts, critical CSS, Vite), `header.html`/`footer.html` (stubs), `breadcrumbs.html`, `feedback.html`, `google-analytics.html` |
| 33 | +- **SCSS**: `_sass/calconnect/` partials for documentation layout, sidebar nav, typography, dark mode |
| 34 | +- **Frontend JS**: `theme.js` (dark/light toggle), `navigation.js` (mobile menu) |
| 35 | +- **Assets**: Logo SVGs (purple/white) |
| 36 | + |
| 37 | +Local `_layouts/` and `_includes/` files override the theme. |
| 38 | + |
| 39 | +### Content Collections |
| 40 | + |
| 41 | +Two Jekyll collections drive the site: |
| 42 | + |
| 43 | +- **`pages`** (`_pages/`) — Main content sections. Each top-level section has an index `.md` file and a subdirectory with child pages. Permalink: `/:path/` |
| 44 | +- **`appendixes`** (`_appendixes/`) — Supplementary content (Glossary, Standards, Links, Examples). Permalink: `/Appendix/:path/` |
| 45 | + |
| 46 | +### Page Front Matter (Navigation) |
| 47 | + |
| 48 | +- `parent` — Path to parent page (e.g., `"/"` for top-level, `"/iCalendar-Topics"` for children) |
| 49 | +- `order` — Sort order within siblings |
| 50 | +- `mainParent` — Groups pages under a top-level section for sidebar display |
| 51 | +- `parents` — Semicolon-separated breadcrumb trail in `Title:URL` format |
| 52 | +- `childs` — Comma-separated list of child page titles (for active-state highlighting) |
| 53 | +- `layout` — `default`, `page`, `home`, `toc`, `toc-type`, `post` |
| 54 | + |
| 55 | +### Layouts |
| 56 | + |
| 57 | +- `default` → theme's `base` (head, header, main, footer, Vite JS) |
| 58 | +- `page` → `default` (simple max-width container) |
| 59 | +- `home` → `default` (landing page with hero and icon grid) |
| 60 | +- `toc` → `default` (Table of Contents with hierarchical listing) |
| 61 | +- `toc-type` → `default` (section landing page with breadcrumb, content, and sidebar) |
| 62 | +- `post` → `default` (blog-style article) |
| 63 | + |
| 64 | +### CSS / Frontend |
| 65 | + |
| 66 | +- **Tailwind CSS v4** via Vite + jekyll-vite |
| 67 | +- Entry point: `_frontend/entrypoints/application.css` (Tailwind + `@theme` design tokens) |
| 68 | +- JS entry: `_frontend/entrypoints/application.js` (imports theme.js + navigation.js) |
| 69 | +- Fonts: Inter (body) + JetBrains Mono (code), loaded via Google Fonts |
| 70 | +- Dark mode: class-based (`html.dark`), toggled via `theme.js` with localStorage |
| 71 | + |
| 72 | +### Includes |
| 73 | + |
| 74 | +- `head.html` — Overrides theme: DEVGUIDE-specific title and favicon |
| 75 | +- `header.html` — Overrides theme: DEVGUIDE nav links + dark mode toggle |
| 76 | +- `footer.html` — Overrides theme: DEVGUIDE page/appendix links |
| 77 | +- `script.html` — GA4 tracking (production only) |
| 78 | +- `toc-sidebar.html` — Recursive sidebar navigation (front-matter-driven) |
| 79 | +- `toc-entry.html` — Recursive ToC entry renderer |
| 80 | +- `toc-mainPage-placeholder.html` — Renders child links for section landing pages |
| 81 | + |
| 82 | +### Plugin: PlantUML |
| 83 | + |
| 84 | +`_plugins/jekyll-plantuml.rb` provides a `{% plantuml %}` Liquid tag that generates SVG diagrams using `_bin/plantuml.jar`. |
| 85 | + |
| 86 | +## Content Structure |
| 87 | + |
| 88 | +Top-level sections (each is a `_pages/*.md` index + subdirectory): |
| 89 | + |
| 90 | +| Section | Topics | |
| 91 | +|---|---| |
| 92 | +| iCalendar Topics | Best Practices, Dates/Times, History, Recurrences, Validation | |
| 93 | +| CalDAV | Client/Server implementations, libraries, building clients, FAQs | |
| 94 | +| CardDAV | Client implementations | |
| 95 | +| Scheduling | FreeBusy, iTIP, vAvailability, vPoll | |
| 96 | +| Tasks | Introduction, Component | |
| 97 | +| Time Zones | Best Practices, Sources, TZDS | |
| 98 | +| Data Model | Simple Event, UID, Detailed Description | |
| 99 | +| vCard | vCard 4, vCard 5 | |
| 100 | +| jsCalendar Topics | Introduction, Implementations | |
| 101 | +| iMIP | Internet Scheduling | |
| 102 | +| iTIP | iTIP scheduling | |
| 103 | +| Publishing | Publishing calendars | |
| 104 | +| Other Topics | Calendar spam | |
| 105 | + |
| 106 | +## CI Workflows |
| 107 | + |
| 108 | +- **`build_deploy`** — Builds with Jekyll + Vite and deploys to GitHub Pages on push to `master` |
| 109 | +- **`links`** — Runs lychee link checker on built `_site/` HTML |
| 110 | + |
| 111 | +## Conventions |
| 112 | + |
| 113 | +- Content files are Markdown (`.md`) with YAML front matter |
| 114 | +- 2-space indentation, LF line endings, UTF-8 encoding (`.editorconfig`) |
| 115 | +- Pages with `published: false` in front matter are excluded from navigation |
0 commit comments