Showing Post by my own param

Hi, I want to list some posts with my parameter
Please chk the code

            <ul class="trending-items">
                {{ range (where .Site.RegularPages ".Params.trending" "true") }}
                <li class="trending-item"><a href="{{.Permalink | absURL }}" aria-label="{{ .Params.trendname | title}}">{{ .Params.trendname | title}}</a></li>
                {{ end }}

and here’s the front matter

trending: true
trendname: Windows 11 Release

But that doesn’t work.

Check the documentation on using where with booleans:

Apart from that: “doesn’t work” is not an error description that will help any one to understand what happens. You might want to be more descriptive, saying something like “the posts don’t show up”, “all posts show up”, “I get the error message …”

there no post that show up! however the code seems to work! but no output!

You need to compare it with the boolean value true, try:

{{ range (where .Site.RegularPages ".Params.trending" true) }}