Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build site

on:
push:
pull_request:
branches: [main]
paths:
- "data/**.md"
Expand All @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: astral-sh/setup-uv@v5

Expand All @@ -28,8 +30,6 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet index.html || (
git add index.html &&
git commit -m "chore: rebuild site [skip ci]"
git commit -m "chore: rebuild index.html [skip ci]" &&
git push
)

- name: Push
run: git push
106 changes: 106 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Publishing the SIMLab Website

The website at [simlab-vs.github.io](https://simlab-vs.github.io) is generated from
two plain-text Markdown files and a Python build script. No build tools, no
dependencies, no framework.

## How it works

```
data/projects.md ─┐
data/collaborators.md ─┤──► build.py ──► index.html ──► GitHub Pages
index.html (template) ─┘
```

`build.py` parses the Markdown files and injects the generated HTML between
marker comments in `index.html`. GitHub Pages then serves `index.html` directly
from the `main` branch.

## Editing content

### Projects — `data/projects.md`

Each project is a `## Heading` block followed by optional `key: value` fields
and a free-form description paragraph:

```markdown
## Project Title
funding: Horizon # Horizon | SNSF | Innosuisse | HES-SO (or any string)
period: 2024–2027
partners: EPFL, WSL
github: https://github.com/simlab-vs/my-project
status: ongoing # ongoing | completed

One or more sentences describing the project. Wrap long lines freely —
the script joins them into a single paragraph.
```

All fields are optional. Only the `## Title` is required.

### Collaborators — `data/collaborators.md`

```markdown
## Full Name
title: Associate Professor
affiliation: EPFL
website: https://example.com
email: name@example.com # optional, not displayed publicly

One or two sentences of bio.
```

### Funding badge colours

| Value | Badge colour |
|------------|-------------|
| Horizon | Blue |
| SNSF | Green |
| Innosuisse | Amber |
| HES-SO | Purple |
| other | Grey |

## Rebuilding locally

Requires [uv](https://docs.astral.sh/uv/). No other dependencies.

```bash
# First time: create the virtual environment
uv sync

# Rebuild index.html in-place
uv run build.py

# Preview generated HTML without touching index.html
uv run build.py --check

# Use a different data directory or output file
uv run build.py --data path/to/data --output path/to/index.html
```

## Publishing

All changes go through a pull request. CI automatically rebuilds `index.html`
and commits it to your PR branch — no local build step required.

**Workflow for contributors:**

1. Edit files under `data/` (or `build.py`).
2. Commit and push your changes.
3. Open a pull request — CI will regenerate `index.html` and push a
`chore: rebuild index.html` commit to your branch automatically.

```bash
git add data/team/your-name.md
git commit -m "feat(team): update your-name profile"
git push origin your-branch
```

## Adding a new section to the site

1. Create `data/mysection.md` with the same `## heading` + fields + body format.
2. Add `<!-- BEGIN:mysection -->` / `<!-- END:mysection -->` markers in
`index.html` where the section should appear.
3. Add CSS for the new section directly in `index.html`.
4. Add a `parse_mysection` / `render_mysection` / `build_mysection_html`
function trio in `build.py` following the existing pattern, and call
`inject(text, "mysection", ...)` in `main()`.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,10 @@ <h3>Glory Givi</h3>
<div class="collab-card">
<div class="collab-avatar">MG</div>
<div class="collab-body">
<h3>Marc Gillioz</h3>
<div class="collab-subtitle">Scientist</div>
<h3><a href="https://gillioz.github.io/" target="_blank" rel="noopener">Dr. Marc Gillioz</a></h3>
<div class="collab-subtitle">Senior scientist</div>
<div class="collab-interests"><span class="interest-tag">Deep Learning</span><span class="interest-tag">Time Series</span><span class="interest-tag">Industrial Applications</span></div>

<p class="collab-bio">Marc is currently working on projects related to hydroelectric power production, in particular applying data analysis and machine learning techniques to: - predict strain and fatigue for variable-speed turbines, - detect anomalies in operational data for better maintenance planning. At the HES-SO, Marc has also worked on problems related to power systems, such as power flow optimization through topological changes, modelling of hydroelectric production and high-voltage grids, and network reconstruction using Smart Meter data. Marc&#x27;s background is in high-energy physics, with a stint in software engineering.</p>
</div>
</div>
<div class="collab-card">
Expand All @@ -661,9 +661,9 @@ <h3>Marta Rende</h3>
<div class="collab-card">
<div class="collab-avatar">DO</div>
<div class="collab-body">
<h3>Dion Osmani</h3>
<h3><a href="https://dionosmani.vercel.app/" target="_blank" rel="noopener">Dion Osmani</a></h3>
<div class="collab-subtitle">Assistant</div>

<div class="collab-interests"><span class="interest-tag">Dynamic Systems</span><span class="interest-tag">Optimization</span></div>

</div>
</div>
Expand Down