You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
├── templates/ # HTML templates for auto-generation
34
+
│ ├── publications.html
35
+
│ ├── people.html
36
+
│ └── software.html
37
+
├── scripts/ # Build and validation scripts
38
+
│ ├── build.py
39
+
│ └── ...
40
+
└── tests/ # Automated tests
41
+
└── ...
29
42
```
30
43
31
44
## Design & Theming
@@ -107,9 +120,165 @@ To update the form endpoint:
107
120
2. Create a new form
108
121
3. Replace the `action` URL in the form HTML
109
122
110
-
## Adding Content
123
+
## Automated Content Generation
111
124
112
-
### New Team Member
125
+
The publications, people, and software pages are **automatically generated** from Excel spreadsheets. This makes it easy to update content without editing HTML directly.
126
+
127
+
### How It Works
128
+
129
+
```
130
+
data/ # Source data (edit these!)
131
+
├── publications.xlsx # 104 publications
132
+
├── people.xlsx # 95 people entries
133
+
└── software.xlsx # 20 software items
134
+
135
+
templates/ # HTML templates with markers
136
+
├── publications.html
137
+
├── people.html
138
+
└── software.html
139
+
140
+
scripts/ # Build scripts
141
+
├── build.py # Master build script
142
+
├── build_publications.py
143
+
├── build_people.py
144
+
├── build_software.py
145
+
├── validate_data.py # Data validation
146
+
├── pre_push_check.py # Pre-push checks
147
+
└── utils.py # Shared utilities
148
+
149
+
# Generated output (don't edit directly!)
150
+
├── publications.html
151
+
├── people.html
152
+
└── software.html
153
+
```
154
+
155
+
### Updating Content
156
+
157
+
#### Adding a New Publication
158
+
159
+
1. Open `data/publications.xlsx` in Excel/Google Sheets
160
+
2. Go to the appropriate sheet (`papers`, `preprints`, `chapters`, or `other`)
161
+
3. Add a new row with:
162
+
-`title` - Publication title
163
+
-`title_url` - Link to paper (DOI, PDF, etc.)
164
+
-`citation` - Full citation text (can include HTML links)
165
+
-`image` - Thumbnail filename (optional, place image in `images/publications/`)
-`image` - Photo filename (place photo in `images/people/`)
178
+
4. Save and push to GitHub
179
+
180
+
#### Adding Alumni
181
+
182
+
1. Open `data/people.xlsx`
183
+
2. Go to the appropriate sheet:
184
+
-`alumni_postdocs` - Former postdocs
185
+
-`alumni_grads` - Former graduate students
186
+
-`alumni_managers` - Former lab managers
187
+
-`alumni_undergrads` - Former undergraduates
188
+
3. Add a row with:
189
+
-`name` - Person's name
190
+
-`name_url` - Personal website (optional)
191
+
-`current_position` - e.g., "now at Google"
192
+
-`current_position_url` - Link to current employer (optional)
193
+
194
+
#### Adding Software
195
+
196
+
1. Open `data/software.xlsx`
197
+
2. Go to the appropriate sheet (`python`, `javascript`, or `matlab`)
198
+
3. Add a new row with:
199
+
-`name` - Project name
200
+
-`description` - Brief description
201
+
-`links_html` - HTML for links, e.g., `[<a href="https://github.com/..." target="_blank">GitHub</a>]`
202
+
203
+
### Building Locally
204
+
205
+
```bash
206
+
# Install dependencies
207
+
pip install -r requirements-build.txt
208
+
209
+
# Validate data files
210
+
python scripts/validate_data.py
211
+
212
+
# Build all pages
213
+
python scripts/build.py
214
+
215
+
# Or run the full pre-push check
216
+
python scripts/pre_push_check.py
217
+
```
218
+
219
+
### Automatic Builds (GitHub Actions)
220
+
221
+
When you push changes to `data/`, `templates/`, or `scripts/` on the `main` branch, GitHub Actions automatically:
222
+
223
+
1. Validates all spreadsheet data
224
+
2. Rebuilds the HTML pages
225
+
3. Runs the test suite (76 tests)
226
+
4. Commits and pushes the regenerated HTML
227
+
228
+
You can also manually trigger a build from the [Actions tab](https://github.com/ContextLab/contextlab.github.io/actions).
229
+
230
+
### Spreadsheet Field Reference
231
+
232
+
#### publications.xlsx
233
+
234
+
| Field | Required | Description |
235
+
|-------|----------|-------------|
236
+
|`title`| Yes | Publication title |
237
+
|`title_url`| No | Link to paper |
238
+
|`citation`| Yes | Full citation (HTML allowed) |
239
+
|`image`| No | Thumbnail filename |
240
+
241
+
#### people.xlsx - members sheet
242
+
243
+
| Field | Required | Description |
244
+
|-------|----------|-------------|
245
+
|`name`| Yes | Person's name |
246
+
|`name_url`| No | Personal website |
247
+
|`role`| No | Role in lab |
248
+
|`bio`| No | Biography text |
249
+
|`image`| No | Photo filename |
250
+
251
+
#### people.xlsx - alumni sheets
252
+
253
+
| Field | Required | Description |
254
+
|-------|----------|-------------|
255
+
|`name`| Yes | Person's name |
256
+
|`name_url`| No | Personal website |
257
+
|`current_position`| No | Current role/employer |
258
+
|`current_position_url`| No | Link to employer |
259
+
260
+
#### software.xlsx
261
+
262
+
| Field | Required | Description |
263
+
|-------|----------|-------------|
264
+
|`name`| Yes | Project name |
265
+
|`description`| Yes | Brief description |
266
+
|`links_html`| No | HTML links to repo, docs, etc. |
267
+
268
+
### Tips
269
+
270
+
-**HTML in cells**: You can use HTML tags in spreadsheet cells (e.g., `<a href="...">`, `<em>`, `<strong>`)
271
+
-**Image files**: Place images in the appropriate `images/` subdirectory before referencing them
272
+
-**Validation**: Run `python scripts/validate_data.py` to check for missing required fields or broken image references
273
+
-**Don't edit generated HTML**: Changes to `publications.html`, `people.html`, and `software.html` in the root directory will be overwritten by the build system
274
+
275
+
---
276
+
277
+
## Adding Content (Legacy/Manual Method)
278
+
279
+
> **Note:** For publications, people, and software pages, use the spreadsheet method above. The manual method below is for other pages or special cases.
280
+
281
+
### New Team Member (Manual)
113
282
114
283
1. Add photo to `images/people/` (recommended: 400x400px)
115
284
2. Edit `people.html`, add to appropriate section:
@@ -122,7 +291,7 @@ To update the form endpoint:
122
291
</div>
123
292
```
124
293
125
-
### New Publication
294
+
### New Publication (Manual)
126
295
127
296
1. Add thumbnail to `images/publications/` (recommended: 500x500px with green border)
128
297
2. Edit `publications.html`, add to publications grid:
0 commit comments