Not displaying author's name in the results' body while still indexing them #771
Unanswered
regisphilibert
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🎍Happy New Year to the Pagefind community 🎍
Here's a question to celebrate!
Currently my entries are all prepended by
By John Doe
plus the date and other metas. Now I don't want those part of the body surfaced by pagefind when listing results. To that effect they are not part ofdata-pagefind-body
. What I do want though is for anyone searching John Doe to be presented with the entries they authored.What I'm trying to achieve here is not showing the author's name as part of the results body, because it already is displayed as a meta. I want to avoid having "By John Doe" in the body, on top of the "By: John Doe" in the meta below. See what I don't want below:
To achieve this, I've been trying to include the name in search by passing it as an attribute rather than in the body like so:
But when I do this, searching for
John
won't bring up the entries of John Doe. (note the real names are more unique than John)I wonder if anybody has an idea of what I am missing?
Thanks a ton!
Beta Was this translation helpful? Give feedback.
All reactions