swup/docs

Exclude some pages from the search

Opened this issue · 3 comments

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 commented

Sounds like a good solution to me!

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 🤤

Nice, custom ranking now also also is a thing