@@ -26,12 +26,12 @@ about contributing to our website, our **Python Packaging Guide** and our
2626Have you decided to contribute? We use the [ Jekyll framework] ( https://jekyllrb.org )
2727for creating this site. To set up a ** development environment** and ** run the site locally** , follow these steps:
2828
29- 1 . Install ruby and bundler on your machine. See [ the Jekyll docs] ( https://jekyllrb.com/docs/installation/ ) for instructions, if needed .
29+ 1 . Install ruby and bundler on your machine. See [ the Jekyll docs] ( https://jekyllrb.com/docs/installation/ ) for instructions.
30302 . Fork and clone this repository.
31313 . Run ` bundle install ` in the root of the cloned repository directory. This will
3232 install the gems needed to run the site locally.
33334 . Run ` bundle exec jekyll serve ` to start the jekyll web server.
34- NOTE: if you want the page to automagically reload use: ` bundle exec jekyll serve --livereload ` . this requires Jekyll 3.7 or higher.
34+ NOTE: if you want the page to automatically reload, use: ` bundle exec jekyll serve --live reload. ` This requires Jekyll 3.7 or higher.
35355 . Open your browser and navigate to ` http://127.0.0.1:4000/ ` .
3636
3737Please test your changes locally prior to submitting a pull request (PR).
@@ -43,6 +43,36 @@ If you are publishing a blog post with a date that is in the future, you can bui
4343
4444` bundle exec jekyll serve --future ` .
4545
46+ ### Images and webp
47+
48+ 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:
49+
50+ For MAC:
51+ ` brew install webp `
52+
53+ Linux:
54+ ` sudo apt-get install imagemagick `
55+
56+ You can convert a directory of PNG images associated with a
57+ blog post that you write using:
58+
59+ ` for file in *.png; do cwebp "$file" -o "${file%.*}.webp"; done `
60+
61+ or a single image
62+
63+ ` cwebp input-image.png -o output-image.webp `
64+
65+ Below is an example of adding a figure to a post that has both webp and .png formats to support older and newer browsers.
66+
67+ ``` html
68+ <figure >
69+ <picture >
70+ <source srcset =" /images/image-name.webp" type =" image/webp" >
71+ <img src =" /images/image-name.png" alt =" Alt text here" />
72+ </picture >
73+ </figure >
74+ ```
75+
4676## Contributors ✨
4777
4878Thanks goes to these wonderful people ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
0 commit comments