Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 32 additions & 12 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,54 @@ jobs:
.map(d => d.name)
.sort();

const url = process.env.DEPLOYMENT_URL;
const sha = (context.payload.pull_request?.head?.sha
|| context.sha).substring(0, 7);
const now = new Date().toUTCString();

const rows = presentations.map(p =>
`| ${p} | ${process.env.DEPLOYMENT_URL}/${p}/ |`
`| ${p} | ${url}/${p}/ | \`${sha}\` |`
).join('\n');

const body = `### Preview Deployment\n\nThis PR has been deployed for preview:\n\n` +
`| Presentation | URL |\n|---|---|\n${rows}\n`;
const body = [
'### Preview Deployment',
'',
'This PR has been deployed for preview:',
'',
'| Presentation | URL | Commit |',
'|---|---|---|',
rows,
'',
`> Last updated: ${now}`,
'',
].join('\n');

// Find existing bot comment
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const comments = await github.paginate(
github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
}
);
const botComment = comments.find(c =>
c.user.type === 'Bot' && c.body.includes('### Preview Deployment')
);

const params = {
owner: context.repo.owner,
repo: context.repo.repo,
};
if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
...params,
comment_id: botComment.id,
body,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
...params,
issue_number: context.issue.number,
body,
});
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ _site/
*/plugin/math/
*/plugin/notes/
*/plugin/search/
*/plugin/zoom/
*/plugin/zoom/

# Shared files copied by build (source of truth: shared/)
*/portrait.js
*/sections/jochen.html

.claude/settings.local.json
127 changes: 24 additions & 103 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,39 @@
# CLAUDE.md

## Project Overview

A collection of [Reveal.js](https://revealjs.com/) presentations by Jochen Zehnder, deployed to GitHub Pages with PR previews on Cloudflare Pages.

### Presentations

| Name | Directory | Description |
|---|---|---|
| Cloud Migrations | `cloud-migrations/` | Best Practices & Learnings for cloud migrations |
| Secure Landing Zones | `secure-landing-zones/` | Secure Landing Zones in highly regulated sectors |
| Docker Training | `docker-training/` | Docker training material (BFH) |

## Tech Stack

- **Framework:** Reveal.js 5.2.x
- **Runtime:** Node.js 24 LTS
- **Styling:** Custom CSS themes (no Tailwind/preprocessors)
- **Icons:** Font Awesome 7.x (CDN)
- **CI/CD:** GitHub Actions → GitHub Pages (prod), Cloudflare Pages (PR previews)

## Repository Structure

```
├── cloud-migrations/ # Presentation: each has index.html + sections/ + imgs/
├── secure-landing-zones/
├── docker-training/
├── shared/ # Shared assets (e.g. author bio) symlinked into presentations
│ └── sections/jochen.html
├── custom-themes/ # Custom Reveal.js CSS themes copied into dist/theme/ at build
│ ├── white_contrast_compact_verbatim_headers.css
│ └── utilities.css # Lightweight utility classes (flex, grid, gap, etc.)
├── scripts/build.js # Build script: copies reveal.js + plugins + themes → _site/
├── .github/workflows/
│ ├── deploy.yml # Deploy main → GitHub Pages
│ └── preview.yml # Deploy PRs → Cloudflare Pages
├── .devcontainer/ # VS Code dev container (Node 24 slim)
└── package.json
```

### Presentation Directory Layout

Each presentation follows the same structure:
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

```
<presentation>/
├── index.html # Entry point with Reveal.js config
├── sections/ # Individual slide sections (HTML fragments)
├── imgs/ # Images (PNG, JPG, SVG)
├── plugin/external/ # Custom external-content-loader plugin (checked in)
├── dist/ # Generated at build time (git-ignored)
└── plugin/{highlight,markdown,notes}/ # Generated at build time (git-ignored)
```

## Commands

```bash
npm ci # Install dependencies
npm run build # Build all presentations into _site/
npm run start:cloud-migrations # Serve cloud-migrations on http://localhost:8000
npm run start:secure-landing-zones # Serve secure-landing-zones on http://localhost:8000
npm run start:docker-training # Serve docker-training on http://localhost:8000
```

There is no test suite or linter configured.

## Build Process

`scripts/build.js` does the following for each presentation:

1. Copies `node_modules/reveal.js/dist/` → `<presentation>/dist/`
2. Copies stock plugins (highlight, markdown, notes) → `<presentation>/plugin/`
3. Copies `custom-themes/*.css` → `<presentation>/dist/theme/`
4. Stages all three presentations into `_site/` for deployment

## Key Conventions

### Slide Authoring

- Slides are **HTML fragments** in `sections/` directories, loaded at runtime via the custom `plugin/external/external.js` plugin using `<section data-external="sections/filename.html">`.
- Add new slides by creating a new HTML file in `sections/` and adding a corresponding `<section data-external="...">` entry in `index.html`.
- Shared content (like the author bio) lives in `shared/` and is **symlinked** into each presentation.
## Project Overview

### HTML & Accessibility
A Reveal.js (v5.2.1) presentation repository containing multiple HTML slide decks deployed to GitHub Pages, with PR preview deployments via Cloudflare Pages.

- Links to external sites must use `target="_blank" rel="noopener noreferrer"`.
- Use ARIA attributes (`aria-label`, `aria-hidden="true"` on decorative icons).
- Use Font Awesome icons via `<i class="fa-solid fa-icon-name">`.
## Common Commands

### CSS & Theming
- **Build all presentations:** `npm run build` — copies reveal.js dist/plugins from node_modules into each presentation, copies custom themes, then stages everything into `_site/`
- **Serve locally:** `npm run start:cloud-migrations`, `npm run start:docker-training`, `npm run start:secure-landing-zones` — serves on port 8000 via `npx serve`
- **Install deps:** `npm install`
Comment on lines +12 to +13
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Install deps” command here uses npm install, but CI workflows use npm ci (and the repo has a package-lock). Consider documenting npm ci as the primary install command (optionally mentioning npm install only for when lockfile updates are intended). Also, serving a presentation locally typically requires running npm run build first since dist/, stock plugins, and shared files (e.g. portrait.js) are generated/copied during build.

Suggested change
- **Serve locally:** `npm run start:cloud-migrations`, `npm run start:docker-training`, `npm run start:secure-landing-zones` — serves on port 8000 via `npx serve`
- **Install deps:** `npm install`
- **Serve locally:** run `npm run build` first, then use `npm run start:cloud-migrations`, `npm run start:docker-training`, or `npm run start:secure-landing-zones` — serves on port 8000 via `npx serve`
- **Install deps:** `npm ci` — use `npm install` only when intentionally updating dependencies or the lockfile

Copilot uses AI. Check for mistakes.

- The main theme is `custom-themes/white_contrast_compact_verbatim_headers.css` with CSS variables (`--r-accent-color`, `--r-background-color`, etc.).
- Utility classes are defined in `custom-themes/utilities.css` (flex, grid, gap, margin/padding helpers). Use these instead of inline styles.
- Accent color: `#24584C` (green). Background: `#F8F9FA`. Text: `#2d3748`.
## Architecture

### Code Style
### Presentations

- **Formatting:** Prettier (auto-format on save via VS Code settings).
- **Files:** Always end with a final newline; trailing whitespace is trimmed.
- **JavaScript:** Vanilla JS, CommonJS in Node scripts. No transpilation.
- **No minification or bundling** — files are served as-is.
Three independent presentations live in top-level directories: `cloud-migrations/`, `docker-training/`, `secure-landing-zones/`. Each contains:
- `index.html` — main entry point with Reveal.js initialization
- `sections/` — individual slide HTML files loaded dynamically via the custom `plugin/external/external.js` plugin using `data-external` attributes
- `dist/` — reveal.js core files (copied by build, gitignored)
- `plugin/` — reveal.js plugins (stock ones copied by build + custom `external/` and `title-footer/`)
- `imgs/` — presentation-specific images

### Git-Ignored Build Outputs
### Build System

The following are generated by `npm run build` and must not be committed:
`scripts/build.js` is the sole build script. It iterates over the `PRESENTATIONS` array, copies reveal.js dist and plugins from `node_modules/`, overlays custom themes from `custom-themes/`, and stages output into `_site/`. To add a new presentation, add its directory name to the `PRESENTATIONS` array in this file and add a corresponding `start:` script in `package.json`.

- `*/dist/` — Reveal.js core files
- `*/plugin/{highlight,markdown,notes}/` — Stock Reveal.js plugins
- `_site/` — Final deployment artifact
### Shared Theming

The custom `plugin/external/` directory **is** checked in and should be committed.
`custom-themes/` contains shared CSS files copied into each presentation's `dist/theme/` at build time:
- `white_contrast_compact_verbatim_headers.css` — main theme (accent: Mariposit Green `#24584C`, links: Metallic Gold `#B39A6A`). Includes component classes: `.section-title`, `.card`, `.badge`, `.styled-list`, `.source`, `.social-links`, `.divider`
- `utilities.css` — Tailwind-like layout utilities (flex, grid, spacing, sizing, typography)

## CI/CD
### CI/CD

- **Production deploy:** Push to `main` triggers `.github/workflows/deploy.yml` → builds and deploys to GitHub Pages.
- **PR preview:** Opening/updating a PR triggers `.github/workflows/preview.yml` → builds and deploys to Cloudflare Pages, then comments preview URLs on the PR.
- **Cleanup:** Closing a PR deletes the Cloudflare Pages preview deployment.
- `.github/workflows/deploy.yml` — deploys `_site/` to GitHub Pages on push to main
- `.github/workflows/preview.yml` — deploys PR previews to Cloudflare Pages with bot comment
26 changes: 26 additions & 0 deletions cloud-migrations/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Cloud Migration - Best Practices & Learnings

## Presentation Overview

A presentation on cloud migration best practices and learnings, with a focus on migrating regulated companies to the cloud. Covers legal, security, and technical aspects.

## Slide Order

Sections are loaded in this order (see `index.html`):

1. `header.html` — title slide
2. `jochen.html` — speaker intro (symlink to shared file)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line says jochen.html is a symlink to a shared file, but in the current repo layout sections/jochen.html isn’t present and is instead produced by copying from shared/ during npm run build (see scripts/build.js). Update this description so readers don’t assume symlink support is required.

Suggested change
2. `jochen.html` — speaker intro (symlink to shared file)
2. `jochen.html` — speaker intro (generated from shared content during the build)

Copilot uses AI. Check for mistakes.
3. `disclaimer.html` — disclaimer
4. `cloud.html` — cloud fundamentals
5. `legal.html` — legal considerations
6. `security.html` — security aspects
7. `migration-strategies.html` — migration strategies
8. `migrate-regulated-company.html` — migrating a regulated company
9. `technical.html` — technical details
10. `learnings.html` — key learnings

## Local Development

```bash
npm run start:cloud-migrations
```
Comment on lines +22 to +26
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local dev steps here are incomplete: npm run start:cloud-migrations just serves the directory, but dist/, stock plugins, and shared files like portrait.js / sections/jochen.html are generated/copied by npm run build. Add npm ci/npm install + npm run build as prerequisites (or provide a combined dev script).

Copilot uses AI. Check for mistakes.
1 change: 0 additions & 1 deletion cloud-migrations/portrait.js

This file was deleted.

1 change: 0 additions & 1 deletion cloud-migrations/sections/jochen.html

This file was deleted.

36 changes: 36 additions & 0 deletions docker-training/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Docker Training - BFH

## Presentation Overview

A Docker training presentation for BFH (Bern University of Applied Sciences). Covers Docker fundamentals through advanced topics like orchestration, networking, and monitoring.

## Slide Order

Sections are loaded in this order (see `index.html`):

1. `header.html` — title slide
2. `jochen.html` — speaker intro (symlink to shared file)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line says jochen.html is a symlink to a shared file, but in the current repo layout sections/jochen.html isn’t present and is instead produced by copying from shared/ during npm run build (see scripts/build.js). Update this description so readers don’t assume symlink support is required.

Suggested change
2. `jochen.html` — speaker intro (symlink to shared file)
2. `jochen.html` — speaker intro (copied from `shared/` during `npm run build`)

Copilot uses AI. Check for mistakes.
3. `introduction.html` — Docker introduction
4. `why-docker.html` — motivation for Docker
5. `cloud-native.html` — cloud-native concepts
6. `containers-vs-vms.html` — containers vs virtual machines
7. `container-history.html` — history of containerization
8. `docker-labs.html` — hands-on lab setup
9. `docker-desktop.html` — Docker Desktop
10. `docker-commands.html` — CLI commands
11. `docker-images.html` — images & Dockerfiles
12. `docker-networking.html` — container networking
13. `docker-volumes.html` — persistent storage
14. `docker-compose.html` — Docker Compose
15. `devops-docker.html` — DevOps with Docker
16. `docker-swarm.html` — Swarm orchestration
17. `serverless.html` — serverless concepts
18. `docker-kubernetes.html` — Kubernetes overview
19. `monitoring.html` — container monitoring
20. `resources.html` — further resources

## Local Development

```bash
Comment on lines +33 to +34
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local dev steps here are incomplete: npm run start:docker-training just serves the directory, but dist/, stock plugins, and shared files like portrait.js / sections/jochen.html are generated/copied by npm run build. Add npm ci/npm install + npm run build as prerequisites (or provide a combined dev script).

Suggested change
```bash
Install dependencies, build the generated/copied assets, then start the local server:
```bash
npm ci
npm run build

Copilot uses AI. Check for mistakes.
npm run start:docker-training
```
Binary file modified docker-training/imgs/cncf-landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-training/imgs/cncf-trail-map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker-training/imgs/linux-namespaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-training/imgs/long-lived-apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-training/imgs/short-lived-apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker-training/imgs/stackoverflow-survey-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker-training/imgs/stackoverflow-survey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docker-training/portrait.js

This file was deleted.

Loading
Loading