1
0
Fork 0
faulty.equipment/layouts/shortcodes/next-up.html

12 lines
419 B
HTML
Raw Normal View History

2024-04-27 17:52:35 +00:00
{{ $tag := .Get 0 }} {{ $param := .Get 1 }} {{ $next := where (where (sort
2023-09-16 11:50:53 +00:00
site.RegularPages "Date" "asc") ".Date" "gt" .Page.Date) ".Params.tags"
"intersect" (slice $tag) | first 1 }} {{ with $next }} {{ $page := index . 0 }}
<h3>
Next up:
<a href="{{ $page.RelPermalink }}"
>{{ with $param }}{{ index $page.Params $param }}{{ else }}{{ $page.Title
}}{{ end }}</a
>
</h3>
2023-09-16 14:19:49 +00:00
{{ else }}{{ .Inner }}{{ end }}