Website for the Mathematical Modelling for Sustainability Group (MMSG) at the University of Warwick.
It is a static site built with Hugo and the Blowfish theme, and deployed with Netlify. Every pull request gets a Netlify deploy preview, and merging into main publishes the site.
Most updates only need a Markdown or YAML file to be edited. Step-by-step guides:
| I want to… | Guide |
|---|---|
| Add, update or remove a publication | docs/adding-publications.md |
| Add a team member, or move someone to former | docs/adding-people.md |
| Add a software tool | docs/adding-software.md |
| Advertise an open position | docs/adding-opportunities.md |
| Edit a research theme or its selected papers | docs/editing-research.md |
| Find which file controls which page | docs/content-model.md |
See CONTRIBUTING.md for how to submit a change.
You need:
- Hugo, extended edition (
hugo versionshould print+extended). Use the version in netlify.toml (currently 0.163); newer versions may work but print a warning that the theme does not support them yet. - Go, which Hugo uses to download the Blowfish theme (a Hugo module, see go.mod).
- Git.
Then:
git clone https://github.com/mmsg-warwick/mmsg-website.git
cd mmsg-website
hugo serverand open http://localhost:1313/. The page reloads as you edit files. Use hugo server -D to also show pages marked draft: true.
The first run downloads the theme, so it needs an internet connection.
The repository uses pre-commit to fix trailing whitespace, line endings and missing final newlines. It also runs automatically on pull requests via pre-commit.ci, so installing it locally is optional:
pip install pre-commit
pre-commit installcontent/ Pages, written in Markdown (one folder per section)
data/ Structured content: publications, software, opportunities
layouts/ Templates that override or extend the Blowfish theme
static/ Files copied as-is to the site (logos, favicons, software logos)
scripts/ update_publications.py (Zotero → data/publications.json)
docs/ Guides for maintaining the site
hugo.toml Site configuration: title, base URL, theme settings, menu
netlify.toml Netlify build settings, including the Hugo version
.github/ GitHub Actions workflows and Dependabot configuration
public/ and resources/ are generated by Hugo and are not committed.
| Workflow | When | What it does |
|---|---|---|
| Update Publications | Mondays 07:00 UTC, or by hand | Downloads the publications from Zotero and opens a pull request if anything changed. See docs/adding-publications.md. |
| Check Links | Pushes and PRs to main, Mondays 08:00 |
Builds the site and checks every link with lychee. A failure usually means an external link has moved; fix or remove it. |
| Scheduled Rebuild | Daily 05:00 UTC, or by hand | Rebuilds the live site through a Netlify build hook, so that date-dependent content (expired opportunities) updates without a merge. Needs the NETLIFY_BUILD_HOOK secret (below). |
| Netlify | Every PR and every push to main |
Builds a deploy preview for each PR (linked in the PR checks) and publishes main to the live site. |
| Dependabot and pre-commit.ci | Periodically | Open PRs to update GitHub Actions and pre-commit hooks. Merge them once the checks pass. |
The Scheduled Rebuild workflow needs a Netlify build hook URL, stored as a repository secret:
- In Netlify: Site configuration → Build & deploy → Continuous deployment → Build hooks → Add build hook, for branch
main. Copy the URL. - In GitHub: Settings → Secrets and variables → Actions → New repository secret, named
NETLIFY_BUILD_HOOK, with the URL as its value. - Test it from the Actions tab: Scheduled Rebuild → Run workflow.
GitHub pauses scheduled workflows in repositories with no activity for 60 days; re-enable it from the Actions tab if that happens.
- Hugo: change
HUGO_VERSIONin netlify.toml andhugo-versionin check_links.yaml, keeping them the same. Check that the Blowfish version in go.mod supports it (hugo mod graphwarns if not). - Blowfish: run
hugo mod get -u github.com/nunocoracao/blowfish/v2and commit the changes togo.modandgo.sum. Check the deploy preview carefully, since the templates inlayouts/override parts of the theme.
All source code in this repository is licensed under the MIT License. See LICENCE.
Website content is licensed under CC BY 4.0 unless otherwise stated. See CONTENT_LICENCE.
Individual publications, figures, or datasets may be subject to their own licences.