Exclude pages with a given param from list layout

I have a list layout as follows:

{{- $pages := union .RegularPages .Sections -}}
{{- if .IsHome -}}
{{- $pages = .Sections -}}
{{- end -}}

{{- $paginator := .Paginate $pages -}}
{{- range $index, $page := $paginator.Pages -}}
<ul class="undecorated">
  <li><a href="{{- .Permalink -}}">
    {{ partial "posts/post_thumb.html" . -}}
    <div class="info"><span>{{- .Title -}}</span>
    {{- if .Description -}}<span>{{- .Description -}}</span>{{ end }}
    <time>{{- .Date | time.Format ":date_medium" -}}</time></div></a>
  </li>
</ul>
{{- end -}}

I would like to exclude from this list pages with .Params.format eq docs as stated in frontmatter as:

---
title: links
tags: ['docs', 'développement', 'markdown']
format: doc
---

It should be also select from tags: docs

thank you

Search the documentation for “collections.Where”

Thanks for the guidance.

I changed for {{- $pages := union (where page.Pages "Params.tags" "ne" "docs") .Sections -}}

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.