Skip to content

Commit 04cc8d9

Browse files
committed
feat: clean up homepage
Assisted-by: Copilot:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent fc58b13 commit 04cc8d9

8 files changed

Lines changed: 419 additions & 31 deletions

File tree

.github/copilot-instructions.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copilot Instructions — scikit-build.github.io
2+
3+
Hugo site for [scikit-build.org](https://scikit-build.org). Uses the [PaperMod](https://github.com/adityatelange/hugo-PaperMod) theme loaded as a Hugo module (not a git submodule).
4+
5+
## Commands
6+
7+
```bash
8+
# Build the site (output to public/)
9+
hugo build
10+
11+
# Live-reload dev server (drafts included)
12+
hugo server --buildDrafts
13+
14+
# Build for production (minified, correct baseURL)
15+
hugo --minify --baseURL "https://scikit-build.org/"
16+
17+
# Update Hugo module dependencies
18+
hugo mod tidy
19+
```
20+
21+
> Hugo v0.146.0+ and Go are both required (PaperMod enforces this at build time).
22+
23+
## Architecture
24+
25+
The home page is fully custom — it does **not** use PaperMod's built-in list or profile modes.
26+
27+
| File | Role |
28+
|---|---|
29+
| `layouts/index.html` | Custom home page template (hero + project cards grid). Overrides PaperMod's default list layout for the home page only. |
30+
| `data/projects.yaml` | Single source of truth for all project cards. Iterated via `{{- range hugo.Data.projects }}` in the template. |
31+
| `assets/css/extended/homepage.css` | Custom CSS loaded automatically by PaperMod from `assets/css/extended/`. Uses PaperMod CSS variables (`--border`, `--primary`, `--theme`, `--entry`, `--secondary`) for automatic dark mode support. |
32+
| `hugo.toml` | Site config, PaperMod params, and nav menu. |
33+
34+
PaperMod layouts (in the Hugo module cache) can be browsed after running `hugo mod vendor`, which writes them to `_vendor/` (gitignored).
35+
36+
## Key Conventions
37+
38+
**Adding a project card:** Add an entry to `data/projects.yaml`. Supported fields:
39+
- `name` (required), `description` (required), `github` (required)
40+
- `docs` — if present, a Docs badge appears on the card
41+
- `pypi` — if present, a PyPI badge appears on the card
42+
- `primary: true` — renders a highlighted "Core" badge and thicker border
43+
44+
**Adding a new page** (e.g. tutorials): Create `content/tutorials/my-page.md` with front matter. Add a `[[menu.main]]` entry in `hugo.toml` to surface it in the nav. PaperMod's standard `single.html` layout is used automatically.
45+
46+
**CSS:** All custom styles go in `assets/css/extended/`. Files here are automatically concatenated and minified by PaperMod — no import needed. Always use PaperMod's CSS variables rather than hard-coded colours so dark mode works for free. The hero logo uses `filter: invert(1)` under `.dark` to remain visible on dark backgrounds.
47+
48+
**Logo assets** live in `static/images/` (SVGs) and `static/` (favicon PNG), sourced from the [scikit-build/scikit-build](https://github.com/scikit-build/scikit-build/tree/main/docs/logo) repo:
49+
- `scikit_build_logo.svg` — wide lockup used in the hero (1167×262.6)
50+
- `scikit_build_mark.svg` — square mark used in the nav header (`params.label.icon`)
51+
- `favicon.png` — mark PNG used as site favicon (`params.assets.favicon*`)
52+
53+
**Hugo module updates:** The theme is pinned via `go.sum`. Run `hugo mod get github.com/adityatelange/hugo-PaperMod@master && hugo mod tidy` to update it.
54+
55+
**Deployment:** Pushing to `main` triggers `.github/workflows/deploy.yml`, which builds with Hugo (extended) and deploys to GitHub Pages via the Actions Pages API. No manual publish step needed.

assets/css/extended/homepage.css

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
margin-bottom: 3rem;
77
}
88

9-
.home-hero-title {
10-
font-size: 2.8rem;
11-
font-weight: 800;
12-
margin: 0 0 0.75rem;
13-
letter-spacing: -0.02em;
9+
.home-hero-logo {
10+
max-width: 420px;
11+
width: 100%;
12+
height: auto;
13+
margin: 0 auto 1.5rem;
14+
display: block;
15+
}
16+
17+
/* Invert the logo in dark mode so it stays visible */
18+
.dark .home-hero-logo {
19+
filter: invert(1);
1420
}
1521

1622
.home-hero-subtitle {
@@ -37,23 +43,20 @@
3743
font-size: 0.95rem;
3844
font-weight: 600;
3945
text-decoration: none;
40-
transition: opacity 0.15s;
46+
color: var(--primary);
47+
background: transparent;
48+
border: 2px solid var(--border);
49+
transition: border-color 0.15s, background 0.15s;
4150
}
4251

4352
.home-btn:hover {
44-
opacity: 0.85;
45-
}
46-
47-
.home-btn-primary {
48-
background: var(--theme);
49-
color: var(--primary);
50-
border: 2px solid var(--primary);
53+
border-color: var(--primary);
54+
background: var(--entry);
5155
}
5256

57+
.home-btn-primary,
5358
.home-btn-secondary {
54-
background: transparent;
55-
color: var(--primary);
56-
border: 2px solid var(--border);
59+
/* intentionally empty — both buttons share the same style */
5760
}
5861

5962
/* ── Projects section ────────────────────────────────────────────────────── */
@@ -94,11 +97,6 @@
9497
transform: translateY(-2px);
9598
}
9699

97-
.project-card-primary {
98-
border-color: var(--primary);
99-
border-width: 2px;
100-
}
101-
102100
.project-card-header {
103101
display: flex;
104102
align-items: center;
@@ -115,13 +113,13 @@
115113

116114
.project-card-badge {
117115
font-size: 0.65rem;
118-
font-weight: 700;
116+
font-weight: 600;
119117
text-transform: uppercase;
120118
letter-spacing: 0.05em;
121119
padding: 0.15rem 0.45rem;
122120
border-radius: 4px;
123-
background: var(--primary);
124-
color: var(--theme);
121+
border: 1px solid var(--border);
122+
color: var(--secondary);
125123
white-space: nowrap;
126124
}
127125

data/projects.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,58 @@
55
github: https://github.com/scikit-build/scikit-build-core
66
docs: https://scikit-build-core.readthedocs.io/
77
pypi: https://pypi.org/project/scikit-build-core/
8-
primary: true
8+
labels: ["build backend"]
99

10-
- name: scikit-build
10+
- name: scikit-build (classic)
1111
description: >-
1212
The original improved build system generator for CPython C, C++, Cython,
1313
and Fortran extensions. A bridge between setuptools and CMake.
1414
github: https://github.com/scikit-build/scikit-build
1515
docs: https://scikit-build.readthedocs.io/
1616
pypi: https://pypi.org/project/scikit-build/
17+
labels: ["build backend"]
1718

1819
- name: cmake-python-distributions
1920
description: >-
2021
Provides infrastructure to build and distribute CMake as a Python wheel,
2122
making CMake easily installable via pip on all major platforms.
2223
github: https://github.com/scikit-build/cmake-python-distributions
2324
pypi: https://pypi.org/project/cmake/
25+
labels: ["binary"]
2426

2527
- name: ninja-python-distributions
2628
description: >-
2729
Provides infrastructure to build and distribute Ninja as a Python wheel,
2830
making the Ninja build system easily installable via pip.
2931
github: https://github.com/scikit-build/ninja-python-distributions
3032
pypi: https://pypi.org/project/ninja/
33+
labels: ["binary"]
3134

3235
- name: cython-cmake
3336
description: >-
3437
CMake helpers for building Cython extension modules, making it easier to
3538
integrate Cython into CMake-based build systems.
3639
github: https://github.com/scikit-build/cython-cmake
3740
pypi: https://pypi.org/project/cython-cmake/
41+
labels: ["CMake"]
3842

3943
- name: f2py-cmake
4044
description: >-
4145
CMake helpers for building Fortran extension modules via F2Py, enabling
4246
Fortran code to be easily wrapped and called from Python.
4347
github: https://github.com/scikit-build/f2py-cmake
4448
pypi: https://pypi.org/project/f2py-cmake/
49+
labels: ["CMake"]
50+
51+
- name: moderncmakedomain
52+
description: >-
53+
A Sphinx domain for Modern CMake, providing rich cross-referencing and
54+
documentation support for CMake commands, variables, and modules.
55+
github: https://github.com/scikit-build/moderncmakedomain
56+
pypi: https://pypi.org/project/moderncmakedomain/
57+
58+
- name: scikit-build-sample-projects
59+
description: >-
60+
Sample projects demonstrating how to use scikit-build and scikit-build-core
61+
to build Python extensions with CMake across a range of use cases.
62+
github: https://github.com/scikit-build/scikit-build-sample-projects

hugo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ theme = 'github.com/adityatelange/hugo-PaperMod'
1010
ShowShareButtons = false
1111
ShowPostNavLinks = false
1212
hideMeta = true
13+
defaultTheme = "auto"
14+
15+
[params.assets]
16+
favicon = "/favicon.png"
17+
favicon16x16 = "/favicon.png"
18+
favicon32x32 = "/favicon.png"
19+
apple_touch_icon = "/favicon.png"
20+
21+
[params.label]
22+
text = ""
23+
icon = "images/scikit_build_mark.svg"
24+
iconHeight = 36
1325

1426
[params.homeInfoParams]
1527
Title = "scikit-build"

layouts/index.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{{- define "main" }}
22
<div class="home-hero">
3-
<h1 class="home-hero-title">scikit-build</h1>
3+
<img
4+
class="home-hero-logo"
5+
src="/images/scikit_build_logo.svg"
6+
alt="scikit-build"
7+
width="420"
8+
height="95"
9+
/>
410
<p class="home-hero-subtitle">
511
An ecosystem of tools for building Python packages with compiled extensions —
612
especially those powered by <a href="https://cmake.org/">CMake</a>.
@@ -13,7 +19,10 @@ <h1 class="home-hero-title">scikit-build</h1>
1319
GitHub
1420
</a>
1521
<a class="home-btn home-btn-secondary" href="https://scikit-build-core.readthedocs.io/">
16-
Documentation
22+
Documentation (core)
23+
</a>
24+
<a class="home-btn home-btn-secondary" href="https://scikit-build.readthedocs.io/">
25+
Documentation (classic)
1726
</a>
1827
</div>
1928
</div>
@@ -22,11 +31,11 @@ <h1 class="home-hero-title">scikit-build</h1>
2231
<h2 class="projects-section-title">Projects</h2>
2332
<div class="projects-grid">
2433
{{- range hugo.Data.projects }}
25-
<a class="project-card{{ if .primary }} project-card-primary{{ end }}" href="{{ .github }}" target="_blank" rel="noopener noreferrer">
34+
<a class="project-card" href="{{ .github }}" target="_blank" rel="noopener noreferrer">
2635
<div class="project-card-header">
2736
<h3 class="project-card-name">{{ .name }}</h3>
28-
{{- if .primary }}
29-
<span class="project-card-badge">Core</span>
37+
{{- range .labels }}
38+
<span class="project-card-badge">{{ . }}</span>
3039
{{- end }}
3140
</div>
3241
<p class="project-card-description">{{ .description }}</p>

static/favicon.png

77.7 KB
Loading

0 commit comments

Comments
 (0)