|
|
@@ -123,6 +123,8 @@ to run the production server, do:
|
|
|
|
|
|
we display images in various sizes so that the browser can pick the best image in terms of quality / size ratio — for instance by not downloading a high-res image prepared for a big screen if the browser request comes from a small screen device (eg. a phone). to deal with this, there a CLI script called `build_image_cache.py` at the root of the repo. it offers two commands:
|
|
|
|
|
|
+before generating images make sure that the cache folder exists in static/images, otherwise images won't get written
|
|
|
+
|
|
|
- `build-all-images`: this build all images across the content repo. if an image exists already in the `./static/images/cache/` folder, it will skip it. you can either remove it from the cache folder or rename the image to a new name to force-recreate it. run this command like so: `python build_image_cache.py build-all-images '<path/to/content-repo>`
|
|
|
- `build-images`: this command is used in the git post-receive hook in the git bare repo (on the VPS). it checks if the last pushed commit contains also image files, and if so it creates the necessary sizes of each image for the website. check the `post-receive` files for the details
|
|
|
|