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

Exclude some pages from the search #151

Open
1 task done
hirasso opened this issue Sep 16, 2023 · 3 comments
Open
1 task done

Exclude some pages from the search #151

hirasso opened this issue Sep 16, 2023 · 3 comments

Comments

@hirasso
Copy link
Member

hirasso commented Sep 16, 2023

The next step after updating pagefind to 1.0.2 could be to programmatically exclude some pages from the search results. The second result "Announcing swup 2" for example would be nice to be excluded from the search IMO:

image

How to do this

We could maybe introduce a new frontmatter property "exclude-from-search: true" and add the attribute data-pagefind-body only if the property isn't set to true.

How important is this feature to you?

  • Nice to have
@daun
Copy link
Member

daun commented Sep 16, 2023

Sounds like a good solution to me!

@hirasso
Copy link
Member Author

hirasso commented Sep 16, 2023

Actually, I'm a bit confused right now – I had different results locally than I have now that the /pagefind/ path is fixed:

image

It's still not ideal, we will also need some custom weighing I'm afraid. Need to take some time to re-read the pagefind docs, have forgotten everything already again 🤤

@hirasso
Copy link
Member Author

hirasso commented Sep 16, 2023

Nice, custom ranking now also also is a thing

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