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
53 changes: 53 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## What this is

The source for the static website <https://pyoomph.github.io> (the pyoomph finite element framework's homepage). There is no site generator framework: pages are produced by `cat`-ing HTML fragments together, with two Python scripts injecting generated sections.

## Build

```bash
python -m pip install pybtex pybtex-docutils pillow beautifulsoup4 requests
bash gen_page.sh
```

`gen_page.sh` writes into `_generated/` and is the only build step. There are no tests, no linter, and no local dev server — open `_generated/index.html` in a browser to check output (relative paths to `css/` and `media/` resolve correctly from there).

Deployment is automatic: `.github/workflows/deploy.yml` runs the same commands on every push/PR to `main` and publishes `_generated/` to GitHub Pages via `JamesIves/github-pages-deploy-action`.

## How pages are assembled

Every page is `header.html` + body fragments + `footer.html`. Only those two files contain `<html>`/`<head>`/`<body>` — all other `*.html` files in the repo root are **fragments** and are invalid standalone HTML. The nav menu lives in `header.html`.

| Output | Composition |
|---|---|
| `_generated/index.html` | header + `index1.html` + `gen_example_gallery.py` output + `index2.html` + footer |
| `_generated/about.html` | header + `about.html` + `gen_pubs.py` output + footer |
| `_generated/installation.html` | header + `installation.html` + footer |

Both Python scripts write the HTML snippet to **stdout**; `gen_page.sh` splices it in via process substitution. Any diagnostic printing must go to stderr or it lands in the page.

## `gen_example_gallery.py`

Scrapes the tutorial overview table from <https://pyoomph.readthedocs.io/en/latest/>, downloads each thumbnail, resizes it to 200×150 with Pillow into `_generated/media/tutorial/`, and emits a `<ul class="horizontal-media-scroller">` gallery.

- **Requires network access.** It hard-fails if the readthedocs landing page does not contain exactly one `<table>` — i.e. an upstream docs layout change breaks the site build.
- `skip_image_download = False` near the top can be flipped to `True` to reuse already-downloaded thumbnails while iterating on markup.
- `test_gallery.html` is a saved copy of the upstream table, kept for offline styling experiments; it is not part of any build.

## `gen_pubs.py`

Renders `pubs.bib` into the numbered publication list on the About page.

- **Order is the literal order of entries in `pubs.bib`** — the year-based sort is deliberately disabled (see the commented-out line). Add new publications at the top of the file. The `<li value=...>` numbering counts down from the total.
- Every entry needs `year`; non-`incollection` entries also need `volume` and `pages` or the script raises and the build fails.
- Journal names are shortened via the `abbrevs` dict (lowercase key → abbreviation); add an entry there rather than editing the `.bib`. A `journal` starting with `arXiv` renders as *submitted*.
- PDF link: `eprint` (labelled "arXiv preprint" if the URL contains arxiv.org, else "Open Access"), otherwise a local `pdf/<citekey>.pdf` if present.

## Files under `_generated/` that are committed

`css/`, `media/` (minus `media/tutorial/`), `docs.html` and `pdf.html` (meta-refresh redirects to readthedocs), `google3a5a7a86d2ed869e.html` (Search Console verification) and `sitemap.xml` are hand-maintained and tracked in git. The build only *adds* the three page files plus `media/tutorial/` on top of them — never clean the directory.

The three built pages and the tutorial thumbnails are intentionally untracked (`.gitignore` is empty, so they show up in `git status`). Leave them uncommitted; CI regenerates them.
1 change: 1 addition & 0 deletions gen_pubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def format_name(p):
abbrevs={}
abbrevs["europhysics letters"]="EPL"
abbrevs["the european physical journal b"]="Eur. Phys. J. B"
abbrevs["the european physical journal e"]="Eur. Phys. J. E"
abbrevs["proceedings of the national academy of sciences"]="PNAS"
abbrevs["journal of colloid and interface science"]="J. Colloid Interface Sci."
abbrevs["journal of computational physics"]="J. Comp. Phys."
Expand Down
25 changes: 23 additions & 2 deletions pubs.bib
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
@article{Dekker2026b,
title={Pinning induced motion and internal flow in neighbouring evaporating multi-component drops},
@article{deWildt2026,
title={Leidenfrost droplets: The roles of ambient humidity and internal droplet circulation},
author={Maxim de Wildt and Andrea Prosperetti and Christian Diddens and Detlef Lohse},
year={2026},
journal={arXiv preprint arXiv:2608.01828},
url={https://arxiv.org/abs/2608.01828},
eprint={https://arxiv.org/pdf/2608.01828}
}

@article{Saiseau2026,
title={Effective mobilities for thin-film flows on micropillar arrays},
author={Raphael Saiseau and Stefan Karpitschka},
year={2026},
journal={The European Physical Journal E},
volume={49},
pages={68},
doi={10.1140/epje/s10189-026-00615-6},
url={https://doi.org/10.1140/epje/s10189-026-00615-6},
eprint={https://link.springer.com/content/pdf/10.1140/epje/s10189-026-00615-6.pdf}
}

@article{Dekker2026b,
title={Pinning induced motion and internal flow in neighbouring evaporating multi-component drops},
volume={1032},
DOI={10.1017/jfm.2026.11394},
journal={Journal of Fluid Mechanics},
Expand Down
Loading