Skip to content

Instantly share code, notes, and snippets.

@PaulEibensteiner
Last active June 1, 2018 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulEibensteiner/c88e14439abc1111f7388520ade2cf36 to your computer and use it in GitHub Desktop.
Save PaulEibensteiner/c88e14439abc1111f7388520ade2cf36 to your computer and use it in GitHub Desktop.
shortcode
<!-- slightly modified code originally by talves, can be extended to create responsive images etc. as well -->
{{ $nombre := .Get "name" }}
{{ $page := . }}
{{ with .Site.GetPage "section" "images" }}
{{ with .Resources.GetMatch $nombre }}
{{ $image1080x := (.Resize "1080x") }}
<img src="{{ $image1080x.RelPermalink }}">
{{ end }}
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment