Skip to content

Commit e64a489

Browse files
committed
Migrate DEVGUIDE from Materialize to Tailwind CSS via calconnect-theme gem
- Replace Materialize CSS + jQuery with Tailwind CSS v4 + Vite - Adopt calconnect-theme gem for shared layouts, includes, SCSS, and JS - Rewrite all layouts and includes with Tailwind utility classes - Add Vite/Node.js tooling (package.json, vite.config.ts, postcss.config.js) - Create _frontend/ with Tailwind entrypoints, theme.js, navigation.js - Delete vendored Materialize CSS, jQuery, Roboto fonts - Update CI workflows with Node.js setup and calconnect-theme checkout - Rename default branch from master to main
1 parent 09c0e7d commit e64a489

90 files changed

Lines changed: 766 additions & 7329 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_deploy.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: build_deploy
33
on:
44
push:
55
branches:
6-
- master
7-
# - staging
6+
- main
87
pull_request:
98
repository_dispatch:
109
workflow_dispatch:
@@ -28,12 +27,27 @@ jobs:
2827
- name: Checkout
2928
uses: actions/checkout@v4
3029

30+
- name: Checkout calconnect-theme
31+
uses: actions/checkout@v4
32+
with:
33+
repository: calconnect/calconnect-theme
34+
path: ../calconnect-theme
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v6
38+
with:
39+
node-version: '24'
40+
cache: 'npm'
41+
42+
- name: Install npm dependencies
43+
run: npm ci
44+
3145
- name: Setup Ruby
3246
uses: ruby/setup-ruby@v1
3347
with:
3448
ruby-version: '3.2'
3549
bundler-cache: true
36-
cache-version: 0 # Increment this number if you need to re-download cached gems
50+
cache-version: 0
3751
- name: Setup Pages
3852
id: pages
3953
uses: actions/configure-pages@v3
@@ -53,7 +67,7 @@ jobs:
5367
environment:
5468
name: github-pages
5569
url: ${{ steps.deployment.outputs.page_url }}
56-
if: ${{ github.ref == 'refs/heads/master' }}
70+
if: ${{ github.ref == 'refs/heads/main' }}
5771
runs-on: ubuntu-latest
5872
needs: build
5973
steps:

.github/workflows/links.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,26 @@ jobs:
1111
link_checker:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
15+
16+
- name: Checkout calconnect-theme
17+
uses: actions/checkout@v4
18+
with:
19+
repository: calconnect/calconnect-theme
20+
path: ../calconnect-theme
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v6
24+
with:
25+
node-version: '24'
26+
cache: 'npm'
27+
28+
- name: Install npm dependencies
29+
run: npm ci
1530

1631
- uses: ruby/setup-ruby@v1
1732
with:
18-
ruby-version: '3.1'
33+
ruby-version: '3.2'
1934
bundler-cache: true
2035

2136
- name: Build site
@@ -30,10 +45,3 @@ jobs:
3045
fail: true
3146
env:
3247
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
33-
34-
# - name: Create Issue From File
35-
# uses: peter-evans/create-issue-from-file@v2
36-
# with:
37-
# title: Link Checker Report
38-
# content-filepath: ./lychee/out.md
39-
# labels: report, automated issue

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@
88
js/jquery.min.2.1.js
99
js/jquery.min.3.7.js
1010
/firebase-debug.log
11-
Gemfile.lock
11+
Gemfile.lock
12+
13+
# Vite / Node
14+
node_modules/
15+
public/vite*
16+
config/
17+
vendor/

CLAUDE.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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

Gemfile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
11
source "https://rubygems.org"
2-
# Hello! This is where you manage which Jekyll version is used to run.
3-
# When you want to use a different version, change it below, save the
4-
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5-
#
6-
# bundle exec jekyll serve
7-
#
8-
# This will help ensure the proper Jekyll version is running.
9-
# Happy Jekylling!
2+
103
gem "jekyll", "~> 4.3.4"
11-
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12-
gem "minima", "~> 2.5"
13-
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
14-
# uncomment the line below. To upgrade, run `bundle update github-pages`.
15-
# gem "github-pages", group: :jekyll_plugins
16-
# If you have any plugins, put them here!
4+
gem "calconnect-theme", path: "../calconnect-theme"
5+
176
group :jekyll_plugins do
187
gem "jekyll-feed", "~> 0.12"
198
gem "jekyll-asciidoc"
9+
gem "jekyll-vite"
2010
end
2111

22-
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
23-
# and associated library.
12+
gem "jekyll-archives"
13+
2414
platforms :mingw, :x64_mingw, :mswin, :jruby do
2515
gem "tzinfo", ">= 1", "< 3"
2616
gem "tzinfo-data"
2717
end
2818

29-
# Performance-booster for watching directories on Windows
3019
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
3120

32-
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
33-
# do not have a Java counterpart.
3421
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
35-
gem 'jekyll-archives'
36-
gem "jekyll-sass-converter", "~> 2.0"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 01 - Push calconnect-theme to GitHub
2+
3+
Create the GitHub repo and push the initial commit.
4+
5+
```bash
6+
cd /Users/mulgogi/src/calconnect/calconnect-theme
7+
gh repo create calconnect/calconnect-theme --public --description "Shared Jekyll theme gem for CalConnect sites"
8+
git push -u origin main
9+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 02 - Update DEVGUIDE default branch to main
2+
3+
Change the default branch from `master` to `main` and update workflows to reference `main`.
4+
5+
**Files:**
6+
- `.github/workflows/build_deploy.yml` — change trigger branch `master``main`, change deploy condition `refs/heads/master``refs/heads/main`
7+
- `.github/workflows/links.yml` — already uses `main` (verify)
8+
- Update remote HEAD: `git push origin main && git remote set-head origin main`
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# 03 - Migrate standards.calconnect.org to Tailwind/Vite
2+
3+
Full migration from Materialize CSS to shared calconnect-theme with Tailwind/Vite.
4+
5+
## Node.js tooling to create
6+
7+
| File | Source |
8+
|---|---|
9+
| `package.json` | Same as DEVGUIDE (no Vue deps) |
10+
| `vite.config.ts` | Same as DEVGUIDE (no Vue plugin) |
11+
| `postcss.config.js` | Copy from DEVGUIDE |
12+
| `config/vite.json` | Copy from DEVGUIDE (use port 3038) |
13+
| `_frontend/entrypoints/application.css` | Tailwind v4 with standards-specific `@source` paths + doc-type/stage color `@theme` tokens |
14+
| `_frontend/entrypoints/application.js` | Copy from DEVGUIDE |
15+
| `_frontend/js/theme.js` | Copy from calconnect-theme |
16+
| `_frontend/js/navigation.js` | Copy from calconnect-theme |
17+
18+
## Config updates
19+
20+
- `Gemfile`: add `calconnect-theme` (path:), add `jekyll-vite`, remove `minima`, `rubocop`
21+
- `_config.yml`: set `theme: calconnect-theme`, add vite/node excludes
22+
23+
## Layouts to rewrite
24+
25+
| Layout | What to do |
26+
|---|---|
27+
| `default.html` | Replace with `layout: base` + `{{ content }}` |
28+
| `document.html` | Keep Liquid logic, replace Materialize classes with Tailwind |
29+
| `toc-type.html` | Same as DEVGUIDE: Materialize → `.documentation`/`.docs-nav`/`.nav-items` |
30+
| `toc.html` | `container``max-w-4xl mx-auto` |
31+
| `page.html` | `container``max-w-4xl mx-auto py-8 px-4` |
32+
33+
## Includes to rewrite
34+
35+
| Include | What to do |
36+
|---|---|
37+
| `head.html` | Replace with Inter/JetBrains Mono, critical CSS, `{% vite_stylesheet_tag %}` |
38+
| `header.html` | Materialize nav → Tailwind glass navbar with standards links + dark mode toggle |
39+
| `footer.html` | Materialize footer → Tailwind grid footer |
40+
| `script.html` | jQuery/Materialize/init.js → `{% vite_javascript_tag %}` + GA |
41+
| `document.html` | Keep Liquid logic, replace CSS classes for type badges/stage badges/download buttons |
42+
| `toc-sidebar.html` | `menu-sidebar``nav-items` etc. |
43+
| `find-doc.html` | Update CSS classes |
44+
| `copyright.html` | Update CSS classes |
45+
46+
## Doc-type/stage colors
47+
48+
Extract from `_sass/_main.scss` SCSS maps and express as Tailwind `@theme` tokens in `application.css`:
49+
- standard: #0AC442, directive: #540D6E, guide: #D183C9, specification: #65AFFF, report: #3A405A, amendment: #F26430, corrigendum: #C84630, administrative: #BFAE48, advisory: #BD9391
50+
- proposal: #39A0ED, working-draft: #2D7393, committee-draft: #2A6B7C, draft-standard: #1C7F7A, final-draft: #53C170, published: #069E2D, withdrawn: #004E64, cancelled: #2E382E
51+
52+
## Files to delete
53+
54+
- `_sass/materialize/` (entire directory)
55+
- `_sass/main.scss`, `_sass/_main.scss`, `_sass/_metanorma-index.scss`
56+
- `assets/materialize.scss`, `assets/main.scss`, `assets/metanorma-index.scss`
57+
- `js/jquery.min.js`, `js/materialize.min.js`, `js/init.js`
58+
- `fonts/roboto/` (if exists)
59+
60+
## Preserve untouched
61+
62+
- `Makefile`, `scripts/`, `src-documents/`, `bib/`, `bibcoll/`, `csd/`, `_input/`
63+
- `flake.nix`, `flake.lock`, `.envrc`
64+
- `_data/` (doesn't exist — navigation is hardcoded)
65+
- CI workflow (`.github/workflows/build_deploy.yml`) — add Node.js setup step
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 04 - Integrate theme into calconnect.org
2+
3+
Remove duplicated files now provided by calconnect-theme gem.
4+
5+
## Config updates
6+
7+
- `Gemfile`: add `gem "calconnect-theme", path: "../calconnect-theme"`, remove `minima`
8+
- `_config.yml`: change `theme: minima``theme: calconnect-theme`
9+
10+
## Files to delete (now in theme)
11+
12+
- `_layouts/base.html`
13+
- `_layouts/default.html`
14+
- `_layouts/page.html`
15+
- `_includes/head.html`
16+
- `_includes/breadcrumbs.html`
17+
- `_includes/feedback.html`
18+
- `_includes/google-analytics.html`
19+
- `_includes/custom-head.html`
20+
- `_frontend/js/theme.js`
21+
- `_frontend/js/navigation.js`
22+
23+
## Files to keep (site-specific overrides)
24+
25+
- `_includes/header.html`, `_includes/footer.html`
26+
- `_includes/news-card.html`, `_includes/script.html`
27+
- `_layouts/home.html`, `_layouts/category.html`, `_layouts/news-*.html`
28+
- `_frontend/entrypoints/application.css` (site-specific @source paths)
29+
- `_frontend/entrypoints/application.js` (Vue news search)
30+
- `_frontend/components/`, `_frontend/composables/`
31+
- `_data/`, `vite.config.ts`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 05 - Verify all three sites build
2+
3+
1. **calconnect.org**: `cd calconnect.org && bundle install && npm ci && bundle exec jekyll build` — verify no regressions
4+
2. **DEVGUIDE**: `cd DEVGUIDE && bundle install && npm ci && bundle exec jekyll serve` — verify sidebar, dark mode, PlantUML, content
5+
3. **standards.calconnect.org**: `cd standards.calconnect.org && bundle install && npm ci && bundle exec jekyll build` — verify document rendering, doc-type badges, sidebar

0 commit comments

Comments
 (0)