I’m trying retrieve and process images within content/*.html
pages (e.g. content/_index.html
) and the content between the {{ ... }}
delimiters are rendering as strings instead of being processed by Hugo.
Here’s the contents of my content/_index.html
page:
---
title: "Title"
date: 2021-10-04T08:25:23-04:00
draft: false
---
<main>
{{- $image := resources.Get "images/example.jpg" -}}
</main>
In the DOM, I’m seeing this:
<main>
{{- $image := resources.Get "images/example.jpg" -}}
</main>
What am I missing?