Skip to content

Commit bfd4f89

Browse files
committed
fix: add banner to top of event page
Assisted-by: OpenCode:Kimi-K2.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 201e111 commit bfd4f89

5 files changed

Lines changed: 62 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# AGENTS.md — scikit-build.github.io
2+
3+
Hugo static site for [scikit-build.org](https://scikit-build.org).
4+
5+
## Prerequisites
6+
7+
- **Hugo (extended)** v0.146.0+
8+
- **Go** (theme is a Hugo module, not a submodule)
9+
10+
## Commands
11+
12+
```bash
13+
# Dev server (live reload, drafts included)
14+
hugo server --buildDrafts
15+
16+
# Build for production (minify, correct baseURL)
17+
hugo --minify --baseURL "https://scikit-build.org/"
18+
19+
# Update PaperMod theme to latest
20+
hugo mod get github.com/adityatelange/hugo-PaperMod@master && hugo mod tidy
21+
```
22+
23+
## Architecture
24+
25+
- **`layouts/index.html`** — fully custom home page (overrides PaperMod list layout). Pulls project cards from `data/projects.yaml`.
26+
- **`data/projects.yaml`** — single source of truth for project cards. Fields: `name`, `description`, `github`, `docs`, `pypi`, `labels`.
27+
- **`content/events/`** — events section with custom `layouts/events/` templates.
28+
- **`assets/css/extended/`** — custom CSS auto-loaded by PaperMod. No import needed. Use PaperMod CSS variables (`--border`, `--primary`, `--theme`, `--entry`) for free dark mode support.
29+
- **Logos** are in `static/images/` from the upstream `scikit-build/scikit-build` repo. Do not rename; `layouts/index.html` and `hugo.toml` reference them by path.
30+
31+
## Conventions
32+
33+
- **Adding a project card:** edit `data/projects.yaml` only.
34+
- **Adding a page:** create `content/<section>/<page>.md` with front matter, then add a `[[menu.main]]` entry in `hugo.toml`.
35+
- **CSS:** always add to `assets/css/extended/`. Never hard-code colors — use PaperMod variables.
36+
- **Prettier** is enforced via pre-commit (`.pre-commit-config.yaml`). Run `pre-commit run --all-files` before pushing.
37+
38+
## Deployment
39+
40+
Push to `main` triggers `.github/workflows/deploy.yml`, which builds with Hugo (extended) and publishes to GitHub Pages. No manual step needed.

assets/css/extended/events.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,18 @@
167167
gap: 0.5rem;
168168
flex-wrap: wrap;
169169
}
170+
171+
/* ── Event banner ────────────────────────────────────────────────────────── */
172+
.event-banner {
173+
margin: 1.5rem 0;
174+
border: 1px solid var(--border);
175+
border-radius: 6px;
176+
overflow: hidden;
177+
background: var(--entry);
178+
}
179+
180+
.event-banner img {
181+
display: block;
182+
width: 100%;
183+
height: auto;
184+
}

content/events/simple-py.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "SIMPLE-Py"
33
description: "Scientific Installation & Modern Packaging for Language Extensions in Python"
4+
banner: "/images/simplepy.svg"
45
date: 2026-07-13
56
schedule:
67
- day: "Day 1"

layouts/events/single.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{{- define "main" }}
22
<article class="post-single">
3+
{{- with .Params.banner }}
4+
<figure class="event-banner">
5+
<img src="{{ . }}" alt="Event banner" loading="lazy" />
6+
</figure>
7+
{{- end }}
8+
39
<header class="post-header">
410
{{- partial "breadcrumbs.html" . }}
511
<h1 class="post-title">{{ .Title }}</h1>

0 commit comments

Comments
 (0)