CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.48k stars 113 forks source link

Allow untagged pages to appear in search results when sorting #259

Open bglw opened 1 year ago

bglw commented 1 year ago

Discussed in https://github.com/CloudCannon/pagefind/discussions/255

Originally posted by **huphtur** March 24, 2023 Have 2 types of pages on my 11ty site: collection (blog) pages, and one-off pages (eg an about page). Added `data-pagefind-body` to `
` and all the pages get indexed, which is great. I wanted to sort the blog posts by date, so added `data-pagefind-sort="date"` and `sort: { date: "asc" }`. My blog posts are indeed sorted, but now my one-off pages are not shown in the search result anymore.

Pagefind should offer some way to configure how untagged results appear (or not) when sorting.

stereobooster commented 11 months ago

One of ways to approach this is to add configuration similar to what they have in SQL: NULLS FIRST, NULLS LAST