Skip to content

About

Website for the Mathematical Modelling for Sustainability Group (University of Warwick)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Mathematical Modelling for Sustainability Group Website

Netlify Status

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.

Common tasks

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.

Running the site locally

You need:

  • Hugo, extended edition (hugo version should 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 server

and 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.

Optional: pre-commit

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 install

Repository layout

content/        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.

Automation

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.

Setting up the daily rebuild

The Scheduled Rebuild workflow needs a Netlify build hook URL, stored as a repository secret:

  1. In Netlify: Site configuration → Build & deploy → Continuous deployment → Build hooks → Add build hook, for branch main. Copy the URL.
  2. In GitHub: Settings → Secrets and variables → Actions → New repository secret, named NETLIFY_BUILD_HOOK, with the URL as its value.
  3. 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.

Updating Hugo or the theme

  • Hugo: change HUGO_VERSION in netlify.toml and hugo-version in check_links.yaml, keeping them the same. Check that the Blowfish version in go.mod supports it (hugo mod graph warns if not).
  • Blowfish: run hugo mod get -u github.com/nunocoracao/blowfish/v2 and commit the changes to go.mod and go.sum. Check the deploy preview carefully, since the templates in layouts/ override parts of the theme.

Licensing

Source code

All source code in this repository is licensed under the MIT License. See LICENCE.

Website content

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.

About

Website for the Mathematical Modelling for Sustainability Group (University of Warwick)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages