pagefind icon indicating copy to clipboard operation
pagefind copied to clipboard

exclude-selectors does not work

Open JiYouMCC opened this issue 1 year ago • 1 comments

I tried to exclude the emoji image such as below while indexing(in order to ignore them when creating meta):

<img class="emoji" title=":+1:" alt=":+1:" src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png" height="20" width="20">

(the img with class=emoji)

But the option seems no work.

My command as below: ./pagefind_extended --site ${{ github.workspace }}/_site --exclude-selectors "img.emoji" --glob blog/post/**/*.html https://github.com/JiYouMCC/JiYouMCC.github.io/blob/master/.github/workflows/build_jekyll_with_pagefind.yml#L33

Did I misunderstand the documentation or made some mistake?

JiYouMCC avatar Aug 29 '24 09:08 JiYouMCC

Hey @JiYouMCC 👋

Thanks for the report — this looks like something that should be improved. That flag is currently marking the node as "ignored" (the same as data-pagefind-ignore) which removes it from the index, but still allows metadata to be discovered. It should instead be marking the node as "excluded", the same as data-pagefind-ignore="all", which also blocks the metadata.

Will fix 👍

bglw avatar Aug 30 '24 01:08 bglw