diff --git a/README.md b/README.md index 2a1074d3f7f6aa338cae62556a1fc7a39dc35ed2..513221a6363b657e25cd492af4088289c8442e7d 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,20 @@ are used: ``` Note that you can omit the `.md` suffix from the filename. +4. *Static content* + Hugo has special handling for static content (images, linked zip files, etc.). In the root of the repo, + there is a `static/` directory; all static content should go there. Subdirectories can be made to keep + things organized; there are existing directories for `images` and `attachments`. Feel free to create + additional directories if it makes sense. To link to static content, you can use an absolute path from + any page. For example, assuming there is an image in the repo at `static/images/my_image.png`, + you can link to it using the `figure` shortcode as `{{< figure src="/images/my_image.png" >}}`. + - **Special note for .png files**: In order to keep the repo size as small as possible, all images + should be png's if possible, and further processed using the [pngquant](https://pngquant.org) compression + tool. This will reduce the size by ~3-4x while keeping good quality. For example, to process and + overwrite all png files in a directory, run `pngquant --ext .png --force *.png`. *Do the processing + prior to committing the files to the repo, otherwise git will be forced to keep multiple copies as the files + are binary.* + #### Adding your changes Once you've got your set of changes, add and commit them to your branch. Push the branch and