swup / docs

Official swup documentation 📘
https://swup.js.org/getting-started
12 stars 35 forks source link

Exclude some pages from the search #151

Open hirasso opened 10 months ago

hirasso commented 10 months ago

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?

daun commented 10 months ago

Sounds like a good solution to me!

hirasso commented 10 months ago

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 commented 10 months ago

Nice, custom ranking now also also is a thing