hugo/docs
Tristan Rice a49f838cd0 tpl: Add imageConfig function
Add imageConfig function which calls image.DecodeConfig and returns the height, width and color mode of the image. (#2677)

This allows for more advanced image shortcodes and templates such as those required by AMP.

layouts/shortcodes/amp-img.html
```
{{ $src := .Get "src" }}
{{ $config := imageConfig (printf "/static/%s" $src) }}

<amp-img src="{{$src}}"
           height="{{$config.Height}}"
           width="{{$config.Width}}"
           layout="responsive">
</amp-img>
```
2016-11-16 13:00:45 +01:00
..
archetypes [Docs] Copyediting 2015-01-28 18:02:40 -07:00
content tpl: Add imageConfig function 2016-11-16 13:00:45 +01:00
data docs: Add one more quote 2016-04-08 00:06:39 +02:00
layouts docs: Link latest change as commit in the footer 2016-11-04 19:12:17 +01:00
static docs: Compress Hugo logo (hugo.png) 2016-11-06 14:26:44 +01:00
.gitignore Add ToC to long pages 2015-05-11 18:39:42 +02:00
config.toml Add GitInfo 2016-11-01 23:04:12 +01:00