hugo/docs/content/templates
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
..
404.md docs: Add lastmod to content files 2016-01-06 23:55:18 +01:00
ace.md docs: Add lastmod to content files 2016-01-06 23:55:18 +01:00
amber.md docs: Add lastmod to content files 2016-01-06 23:55:18 +01:00
blocks.md docs: Add location of block template 2016-08-20 21:54:14 +02:00
content.md all: Unify case of config variable names 2016-10-24 20:56:00 +02:00
debugging.md Add debugging steps for no variables defined 2016-03-12 21:44:50 +13:00
functions.md tpl: Add imageConfig function 2016-11-16 13:00:45 +01:00
go-templates.md all: Unify case of config variable names 2016-10-24 20:56:00 +02:00
homepage.md docs: Add lastmod to content files 2016-01-06 23:55:18 +01:00
list.md docs: Example of how to use Order by ExpiryDate 2016-06-14 15:45:26 +02:00
overview.md Implement support for alias templates 2016-10-15 15:25:05 +02:00
partials.md docs: Correct spelling for "parameters" in partials.md 2016-08-29 12:25:53 +02:00
rss.md Revert the "standardize author data" 2016-09-18 19:16:39 +02:00
sitemap.md docs: Add lastmod to content files 2016-01-06 23:55:18 +01:00
terms.md Add multilingual support in Hugo 2016-09-06 18:32:15 +03:00
variables.md all: Unify case of config variable names 2016-10-24 20:56:00 +02:00
views.md docs: Document Go 1.6's new ability to trim whitespace 2016-04-09 13:21:23 +02:00