Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bglw opened this issue Apr 1, 2023 Discussed in #255 · 1 comment
Open

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

bglw opened this issue Apr 1, 2023 Discussed in #255 · 1 comment

Comments

@bglw
Copy link
Contributor

bglw commented Apr 1, 2023

Discussed in #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 <main> 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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants