diff --git a/content/templates/functions.md b/content/templates/functions.md index 417e2cdb2..bee82e21f 100644 --- a/content/templates/functions.md +++ b/content/templates/functions.md @@ -356,7 +356,7 @@ e.g. {{ .Content }} {{ end }} -## Files +## Files ### readDir @@ -372,6 +372,16 @@ Reads a file from disk and converts it into a string. Note that the filename mus `{{readFile "README.txt"}}` → `"Hugo Rocks!"` +### imageConfig +Parses the image and returns the height, width and color model. + +e.g. +``` +{{ with (imageConfig "favicon.ico") }} +favicon.ico: {{.Width}} x {{.Height}} +{{ end }} +``` + ## Math