Skip to content

Commit fe26aa9

Browse files
committed
chore: add pre-commit formatting
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent d8b908a commit fe26aa9

7 files changed

Lines changed: 125 additions & 36 deletions

File tree

.github/copilot-instructions.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ hugo mod tidy
2424

2525
The home page is fully custom — it does **not** use PaperMod's built-in list or profile modes.
2626

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. |
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. |
3131
| `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. |
32+
| `hugo.toml` | Site config, PaperMod params, and nav menu. |
3333

3434
PaperMod layouts (in the Hugo module cache) can be browsed after running `hugo mod vendor`, which writes them to `_vendor/` (gitignored).
3535

3636
## Key Conventions
3737

3838
**Adding a project card:** Add an entry to `data/projects.yaml`. Supported fields:
39+
3940
- `name` (required), `description` (required), `github` (required)
4041
- `docs` — if present, a Docs badge appears on the card
4142
- `pypi` — if present, a PyPI badge appears on the card
@@ -46,6 +47,7 @@ PaperMod layouts (in the Hugo module cache) can be browsed after running `hugo m
4647
**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.
4748

4849
**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:
50+
4951
- `scikit_build_logo.svg` — wide lockup used in the hero (1167×262.6)
5052
- `scikit_build_mark.svg` — square mark used in the nav header (`params.label.icon`)
5153
- `favicon.png` — mark PNG used as site favicon (`params.assets.favicon*`)

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- id: check-yaml
8+
- id: check-merge-conflict
9+
10+
- repo: https://github.com/rbubley/mirrors-prettier
11+
rev: v3.8.2
12+
hooks:
13+
- id: prettier

assets/css/extended/homepage.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
color: var(--primary);
4747
background: transparent;
4848
border: 2px solid var(--border);
49-
transition: border-color 0.15s, background 0.15s;
49+
transition:
50+
border-color 0.15s,
51+
background 0.15s;
5052
}
5153

5254
.home-btn:hover {
@@ -88,7 +90,10 @@
8890
text-decoration: none;
8991
color: var(--primary);
9092
background: var(--entry);
91-
transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
93+
transition:
94+
border-color 0.15s,
95+
box-shadow 0.15s,
96+
transform 0.1s;
9297
}
9398

9499
.project-card:hover {

layouts/events/list.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ <h2 class="entry-hint-parent">{{ .Title }}</h2>
1313
</header>
1414
{{- with .Description }}
1515
<div class="entry-content"><p>{{ . }}</p></div>
16-
{{- end }}
17-
{{- if not .Date.IsZero }}
16+
{{- end }} {{- if not .Date.IsZero }}
1817
<footer class="entry-footer">{{ .Date.Format "January 2, 2006" }}</footer>
1918
{{- end }}
20-
<a class="entry-link" aria-label="{{ .Title | plainify }}" href="{{ .Permalink }}"></a>
19+
<a
20+
class="entry-link"
21+
aria-label="{{ .Title | plainify }}"
22+
href="{{ .Permalink }}"
23+
></a>
2124
</article>
22-
{{- end }}
23-
{{- end }}
25+
{{- end }} {{- end }}

layouts/events/single.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@
55
<h1 class="post-title">{{ .Title }}</h1>
66
{{- with .Description }}
77
<p class="post-description">{{ . }}</p>
8-
{{- end }}
9-
{{- if not .Date.IsZero }}
8+
{{- end }} {{- if not .Date.IsZero }}
109
<div class="post-meta">{{ .Date.Format "January 2, 2006" }}</div>
1110
{{- end }}
1211
</header>
1312

1413
{{- with .Content }}
1514
<div class="post-content md-content">{{ . }}</div>
16-
{{- end }}
17-
18-
{{- with .Params.schedule }}
15+
{{- end }} {{- with .Params.schedule }}
1916
<div class="schedule">
2017
{{- range . }}
2118
<section class="schedule-day">
@@ -27,23 +24,29 @@ <h2 class="schedule-day-title">{{ .day }}</h2>
2724
<div class="slot-body">
2825
<div class="slot-header">
2926
<span class="slot-title">{{ .title }}</span>
30-
{{- with .duration }}<span class="slot-duration">{{ . }}</span>{{- end }}
27+
{{- with .duration }}<span class="slot-duration">{{ . }}</span>{{-
28+
end }}
3129
</div>
3230
{{- with .sessions }}
3331
<ul class="slot-sessions">
3432
{{- range . }}
3533
<li class="session-item">
3634
<div class="session-header">
3735
<span class="session-title">{{ .title }}</span>
38-
{{- with .duration }}<span class="session-duration">{{ . }}</span>{{- end }}
39-
{{- with .format }}<span class="session-format">{{ . }}</span>{{- end }}
36+
{{- with .duration }}<span class="session-duration"
37+
>{{ . }}</span
38+
>{{- end }} {{- with .format }}<span class="session-format"
39+
>{{ . }}</span
40+
>{{- end }}
4041
</div>
4142
{{- with .subsessions }}
4243
<ul class="subsession-list">
4344
{{- range . }}
4445
<li class="subsession-item">
4546
<span class="session-title">{{ .title }}</span>
46-
{{- with .duration }}<span class="session-duration">{{ . }}</span>{{- end }}
47+
{{- with .duration }}<span class="session-duration"
48+
>{{ . }}</span
49+
>{{- end }}
4750
</li>
4851
{{- end }}
4952
</ul>

layouts/index.html

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,35 @@
88
height="95"
99
/>
1010
<p class="home-hero-subtitle">
11-
An ecosystem of tools for building Python packages with compiled extensions
12-
powered by <a href="https://cmake.org/">CMake</a>.
11+
An ecosystem of tools for building Python packages with compiled extensions
12+
powered by <a href="https://cmake.org/">CMake</a>.
1313
</p>
1414
<div class="home-hero-links">
1515
<a class="home-btn home-btn-primary" href="https://github.com/scikit-build">
16-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
17-
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z"/>
16+
<svg
17+
xmlns="http://www.w3.org/2000/svg"
18+
width="18"
19+
height="18"
20+
viewBox="0 0 24 24"
21+
fill="currentColor"
22+
aria-hidden="true"
23+
>
24+
<path
25+
d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z"
26+
/>
1827
</svg>
1928
GitHub
2029
</a>
21-
<a class="home-btn home-btn-secondary" href="https://scikit-build-core.readthedocs.io/">
30+
<a
31+
class="home-btn home-btn-secondary"
32+
href="https://scikit-build-core.readthedocs.io/"
33+
>
2234
Documentation (core)
2335
</a>
24-
<a class="home-btn home-btn-secondary" href="https://scikit-build.readthedocs.io/">
36+
<a
37+
class="home-btn home-btn-secondary"
38+
href="https://scikit-build.readthedocs.io/"
39+
>
2540
Documentation (classic)
2641
</a>
2742
</div>
@@ -31,7 +46,12 @@
3146
<h2 class="projects-section-title">Projects</h2>
3247
<div class="projects-grid">
3348
{{- range hugo.Data.projects }}
34-
<a class="project-card" href="{{ .github }}" target="_blank" rel="noopener noreferrer">
49+
<a
50+
class="project-card"
51+
href="{{ .github }}"
52+
target="_blank"
53+
rel="noopener noreferrer"
54+
>
3555
<div class="project-card-header">
3656
<h3 class="project-card-name">{{ .name }}</h3>
3757
{{- range .labels }}
@@ -42,18 +62,56 @@ <h3 class="project-card-name">{{ .name }}</h3>
4262
<div class="project-card-links">
4363
{{- if .docs }}
4464
<span class="project-card-link">
45-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
65+
<svg
66+
xmlns="http://www.w3.org/2000/svg"
67+
width="14"
68+
height="14"
69+
viewBox="0 0 24 24"
70+
fill="none"
71+
stroke="currentColor"
72+
stroke-width="2"
73+
stroke-linecap="round"
74+
stroke-linejoin="round"
75+
aria-hidden="true"
76+
>
77+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
78+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
79+
</svg>
4680
Docs
4781
</span>
48-
{{- end }}
49-
{{- if .pypi }}
82+
{{- end }} {{- if .pypi }}
5083
<span class="project-card-link">
51-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 8v4l3 3"/></svg>
84+
<svg
85+
xmlns="http://www.w3.org/2000/svg"
86+
width="14"
87+
height="14"
88+
viewBox="0 0 24 24"
89+
fill="none"
90+
stroke="currentColor"
91+
stroke-width="2"
92+
stroke-linecap="round"
93+
stroke-linejoin="round"
94+
aria-hidden="true"
95+
>
96+
<circle cx="12" cy="12" r="10" />
97+
<path d="M12 8v4l3 3" />
98+
</svg>
5299
PyPI
53100
</span>
54101
{{- end }}
55102
<span class="project-card-link project-card-link-github">
56-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z"/></svg>
103+
<svg
104+
xmlns="http://www.w3.org/2000/svg"
105+
width="14"
106+
height="14"
107+
viewBox="0 0 24 24"
108+
fill="currentColor"
109+
aria-hidden="true"
110+
>
111+
<path
112+
d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z"
113+
/>
114+
</svg>
57115
GitHub
58116
</span>
59117
</div>
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<div class="nsf-footer">
2-
<p>Support for this work was provided by NSF grant <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2209877&amp;HistoricalAwards=false">OAC-2209877</a>.
3-
Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s)
4-
and do not necessarily reflect the views of the National Science Foundation.</p>
2+
<p>
3+
Support for this work was provided by NSF grant
4+
<a
5+
href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2209877&amp;HistoricalAwards=false"
6+
>OAC-2209877</a
7+
>. Any opinions, findings, and conclusions or recommendations expressed in
8+
this material are those of the author(s) and do not necessarily reflect the
9+
views of the National Science Foundation.
10+
</p>
511
</div>

0 commit comments

Comments
 (0)