Source code for pybamm.org, released under the BSD-3-Clause License.
- Fork this repository
- Install the extended version of Hugo from https://gohugo.io/installation/
and add it to your
PATH
- Clone your forked repository and add the theme repository as a submodule, from https://github.com/scientific-python/scientific-python-hugo-theme. You may update the submodule and pull the latest changes with
git submodule update --init --recursive
- Create pages and run the server locally with
make html
make serve
In development mode, run the server with
make html
make serve-dev
You may use make clean
to clean up build artefacts.
- Before committing your changes, install
pre-commit
, update the hooks, and run with
pip install pre-commit
pre-commit install
to ensure that there are no style errors before committing your changes. The current hooks provide support for checking spelling errors and typos, Markdown style, and common file-based issues.
Rather than just the files changed due to a commit, you may run the hooks on
all files using the pre-commit run --all-files
command.
- To generate the teams page, run
make teams
It is recommended to verify the changes to the teams page before committing. The teams page is generated from the files in static/teams/
and the script scripts/get_teams_info.py
and the output is displayed in content/teams.md
.
Warning: The make teams
command will overwrite the static/teams/
files.
Alternatively, the teams page can be generated in a pull request by manually triggering the teams.yml
workflow.
The website is built using the Hugo static site generator and is hosted on Netlify.
The website uses a privacy-friendly analytics service called Plausible. The analytics data is available for authorised users at https://plausible.io/pybamm.org.