|
| 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. |
0 commit comments