Browse Source

Added clarification on image generation in README.md to avoid issues with new deployments.

slow_tiger 1 year ago
parent
commit
ea89123a2d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      README.md

+ 2 - 0
README.md

@@ -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:
 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-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
 - `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