On list pages outside of my index.html page, I try to access a specific tag theme
, specified in the metadata of the markdown-page. Based on this theme
-tag, I create an <article>
with a class (e.g. <article class=themeVariant-blue>
for theme=blue
.
On the index.html, I achieved this behavior using pagination:
{{ $pages := .Site.RegularPages }}
{{ $paginator := .Paginate (where $pages "Params.type" "ne" "ordinary") }}
{{ range $paginator.Pages }}
<article {{ with .Param "themeVariant" }} class="card themeVariant-{{ . }}" {{ end }}>
<p> content </p>
</article>
{{ end }}
In action it does look like that. The class defines the shadow of the card.
My list.html currently contains of something like that:
{{ range .Pages }}
<article class="card themeVariant-default">
</article>
{{- end -}}
I cannot just copy the code from my index-page is it cannot access that page-variables this way.
Thanks for reading,
help would be very appreciated.
– Luca