@@ -26,12 +26,12 @@ about contributing to our website, our **Python Packaging Guide** and our
26
26
Have you decided to contribute? We use the [ Jekyll framework] ( https://jekyllrb.org )
27
27
for creating this site. To set up a ** development environment** and ** run the site locally** , follow these steps:
28
28
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.
30
30
2 . Fork and clone this repository.
31
31
3 . Run ` bundle install ` in the root of the cloned repository directory. This will
32
32
install the gems needed to run the site locally.
33
33
4 . 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.
35
35
5 . Open your browser and navigate to ` http://127.0.0.1:4000/ ` .
36
36
37
37
Please 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
43
43
44
44
` bundle exec jekyll serve --future ` .
45
45
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
+
46
76
## Contributors ✨
47
77
48
78
Thanks goes to these wonderful people ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
0 commit comments