I am using page bundles with a number of images under an images
directory, adjacent to my index.md
.
I know I need to use the images.inline
shortcode with markdown. What I don’t quite get is how to inline a specific image by resource name.
Here’s my front matter:
---
title: My awesome title
date: 2019-06-27
url: /my-page-slug-here/
resources:
- name: select-engine
src: images/select-engine.png
title: Select RDS Engine
---
Beyond that, I’m not sure what magic incantation inside {{< images.inline >}} ... {{< /images.inline >}}
will allow me to simply reference the image resource by name.
I am able to use ByType
to get the image as follows:
<img class="img-fluid" src="{{< images.inline >}}{{ $img := (index (.Page.Resources.ByType "image") 0) }}{{ ($img.Resize "800x").Permalink}}{{< /images.inline >}}"/>
However, this doesn’t allow me to specify the resource by name.
This seems way harder than it needs to be.
Thanks,
Mark