# pyopensci.github.io
[](#contributors-)
[](https://github.com/pyOpenSci/pyopensci.github.io/actions/workflows/pages/pages-build-deployment)
[](https://zenodo.org/doi/10.5281/zenodo.10594115)
This repo contains the source code for the [pyOpenSci.org](https://pyopensci.org) website. Contributions are welcome. Thank you [**pyOpenSci contributors**](#contributors-)!!
## Getting Started
Please explore [the site](https://pyopensci.org) and let us know what your think. If you find a bug or have
a suggestion for a new feature, [open an issue](https://github.com/pyOpenSci/pyopensci.github.io/issues).
## Next Steps
If you are interested in contributing to pyOpenSci, please read about
how we work in [**pyOpenSci's organization-wide contributing guide**](https://www.pyopensci.org/handbook/CONTRIBUTING.html).
This repo's [CONTRIBUTING.md](./CONTRIBUTING.md) file provides more information
about contributing to our website, our **Python Packaging Guide** and our
**Peer Review Guide**.
## Installation and Development
Have you decided to contribute? We use the [Jekyll framework](https://jekyllrb.org)
for creating this site. To set up a **development environment** and **run the site locally**, follow these steps:
1. Install ruby and bundler on your machine. See [the Jekyll docs](https://jekyllrb.com/docs/installation/) for instructions.
2. Fork and clone this repository.
3. Run `bundle install` in the root of the cloned repository directory. This will
install the gems needed to run the site locally.
4. Run `bundle exec jekyll serve` to start the jekyll web server.
NOTE: if you want the page to automatically reload, use: `bundle exec jekyll serve --live reload.` This requires Jekyll 3.7 or higher.
5. Open your browser and navigate to `http://127.0.0.1:4000/`.
Please test your changes locally prior to submitting a pull request (PR).
### Want to build with new blog posts to be published in the future?
If you are publishing a blog post with a date that is in the future, you can build the site locally using the `--future` option to view it as follows:
`bundle exec jekyll serve --future`.
### Images and webp
We try to keep the image size of our graphics as small/compressed as possible. To enable webp on your system, you first need to install it:
For MAC:
`brew install webp`
Linux:
`sudo apt-get install imagemagick`
You can convert a directory of `.png` images associated with a
blog post that you write using the following bash command:
`for file in *.png; do cwebp "$file" -o "${file%.*}.webp"; done`
or you can convert a single image:
`cwebp input-image.png -o output-image.webp`
Below is an example of how to add figure to a post that supports both `.webp` and `.png` formats. Providing both allows the website to be backwards-compatible with older browsers.
```html
```
## How to update blog post last_updated field
We have a bash script that will automatically update the `last_updated` field in the YAML for all of our blog posts. To run it use:
`./scripts/date-updated.sh`
## 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-infrastructure` channel on Slack using the [rtCamp/action-slack-notify](https://github.com/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:
```yml
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: failure()
env:
SLACK_CHANNEL: pyos-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](https://allcontributors.org/docs/en/emoji-key)):