Last active
January 30, 2019 18:41
-
-
Save miketweaver/193ff9330224db630e68fa211728d50c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $altText := .Get "alt"}} | |
{{ $caption := .Get "caption"}} | |
{{ $source := .Get "source"}} | |
{{ with $.Page.Resources.GetMatch (.Get "name") }} | |
<div class="post-image"> | |
<figure> | |
<a href="{{.RelPermalink}}"> | |
<img | |
srcset=" | |
{{ (.Resize "320x").RelPermalink }} 320w, | |
{{ (.Resize "600x").RelPermalink }} 600w, | |
{{ (.Resize "1200x").RelPermalink }} 2x" | |
src="{{ (.Resize "600x").RelPermalink }}" alt="{{$altText}}"/> | |
</a> | |
<figcaption><p>{{ $caption }}</p>{{ if $source }}<p><a href="{{ $source }}">source</a></p>{{ end }}</figcaption> | |
</figure> | |
</div> | |
{{ else }} | |
could not find image | |
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{< bundle-image name="old_galileo.png" alt="A Photo of the Old Galileo." caption="This is how the Galileo looked in 2001 and how I remember it" source="https://web.archive.org/web/20190130014421/https://voyagerslog.blogspot.com/2016/03/a-tribute-to-first-galileo-as-she.html" >}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment