pyopensci.github.io
This repo contains the source code for the pyOpenSci.org website. Contributions are welcome. Thank you pyOpenSci contributors!!
Get started
Please explore the site. If you find a typo, bug or issue, please open a GitHub issue.
Next Steps
If you are interested in contributing to pyOpenSci, check out our CONTRIBUTING guide for an overview of the types of contributions that we welcome. and our DEVELOPMENT.md for instructions on how to set up the website locally and make changes.
For organization-wide guidelines, see
pyOpenSci's organization-wide contributing guide.
Installation and development
This site is built with Hugo. Source lives at the repository
root (content/, data/, themes/clean-hugo/).
Prerequisites
- Hugo Extended
0.139.4 (matches Netlify and CI)
- Node.js
24 (Active LTS) and npm (PostCSS / autoprefixer for the theme CSS pipeline). An .nvmrc is in the repo root — run nvm use if you use nvm.
Run the site locally
-
Fork and clone this repository.
-
From the repo root, install Node dependencies:
-
Start the Hugo development server:
hugo server --disableFastRender
Use --disableFastRender while editing layouts or CSS so changes rebuild in real time as you work on the site locally.
-
Open http://localhost:1313/ in your browser.
Test your changes locally before opening a pull request. CI runs the same Hugo
build as Netlify (see .github/workflows/build-site.yml).
Production build (optional)
npm ci
hugo --gc --minify
Output is written to public/. Do not commit public/, resources/, or
.hugo_build.lock — they are gitignored.
Future-dated blog posts
buildFuture = true is set in hugo.toml, so posts with a future date in front
matter are included in local builds and production deploys without extra flags.
Project layout (Hugo)
| Path |
Purpose |
content/ |
Pages, blog posts (content/blog/), events (content/events/) |
data/ |
YAML data (packages.yml, contributors.yml, etc.) |
themes/clean-hugo/ |
Site theme (layouts, SCSS, shortcodes) |
static/ |
Images, favicons, Netlify _redirects |
hugo.toml |
Site config, navigation, theme parameters |
For CSS architecture, SCSS partials, and Netlify build details, see
DEVELOPMENT.md. For contributor workflows and the docs
book layout, see CONTRIBUTING.md.
Images and WebP
We try to keep image file sizes as small as practical. To convert PNG images to WebP:
macOS:
Linux:
sudo apt-get install webp
Convert every PNG in a directory:
for file in *.png; do cwebp "$file" -o "${file%.*}.webp"; done
Or convert a single image:
cwebp input-image.png -o output-image.webp
Example figure markup that supports both WebP and PNG (backwards-compatible with older browsers):
<figure>
<picture>
<source srcset="/images/image-name.webp" type="image/webp">
<img src="/images/image-name.png" alt="Alt text here" />
</picture>
</figure>
Store site images under static/images/ (published as /images/...).
How to update blog post last_updated field
We have a bash script that updates the last_modified field in YAML for blog posts
that already include a last_modified: key in front matter:
chmod +x scripts/date-updated.sh
./scripts/date-updated.sh
The script scans content/blog/ for posts that include a last_modified: key
in front matter.
How to update contributor names
Update a contributor's name on the Our Community page in data/contributors.yml.
Important: Do not update contributor names in data/packages.yml. Changes there can be overwritten by automated workflows.
contributors.yml is the source of truth for people metadata; names are gathered
from contributor files using each person's GitHub username.
Monitoring Automated Tasks
There are a few automated CI tasks in this repository to keep the website data up to date. In order for us to have visibility into when these jobs fail, we have automated a Slack bot to send a message to the #pyos-maintainers-infrastructure channel on Slack using the rtCamp/action-slack-notify GitHub Action step. This action can be used within any repository in the PyOpenSci GitHub organization (as SLACK_NOTIFICATIONS_BOT_TOKEN is an org-wide secret) via:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: failure()
env:
SLACK_CHANNEL: pyos-maintainers-infrastructure
SLACK_COLOR: '#db540b'
SLACK_LINK_NAMES: true
SLACKIFY_MARKDOWN: true
SLACK_MESSAGE: "Notification from GitHub Actions"
SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!