Verified Commit 3c92497e authored by Adam Caprez's avatar Adam Caprez
Browse files

Add section on static content.

parent 8742a3f8
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment