Fix layout to compile with latest hugo version

This commit is contained in:
Christian Wolf 2024-03-05 19:15:36 +01:00
parent 2c57279611
commit 3377517655
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<!--
{{ .Get "url"}}{{ page.Resources}}
-->
{{ $res := page.Resources.GetMatch (.Get "url") }}
{{ $res := .Page.Resources.GetMatch (.Get "url") }}
<a target="_blank" class="download press-download" href="{{ $res.RelPermalink }}">
{{ .Inner }}
</a>

View File

@ -1,7 +1,11 @@
<!--
{{ .Get "src"}}{{ page.Resources}}
<p>{{ page.Resources }}</p>
<p>Page: {{ page }}</p>
{{ .Get "src"}}
Scratch: {{ page.Scratch.Get "article" }}
<p>[{{/* $article.Resources */}}]</p>
-->
<div class="press-img">
{{- $res := page.Resources.GetMatch (.Get "src") -}}
{{- $res := .Page.Resources.GetMatch (.Get "src") -}}
<img{{ with .Get "alt" }} alt="{{ . }}"{{ end }} src="{{ $res.RelPermalink }}">
</div>