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

[Question] Page title both in result and header of the snippet content #731

Open
gustaveWPM opened this issue Oct 19, 2024 · 2 comments
Open

Comments

@gustaveWPM
Copy link

gustaveWPM commented Oct 19, 2024

Hi,

When searching for a blog post titled "Fall-Winter 2024 Fashion Trends", Pagefind displays the following result :
Capture d’écran du 2024-10-19 16-52-22

The problem is that the title is duplicated in the content snippet, which is redundant.
I would prefer that the title did not repeat within the snippet.

Is there a way to adjust the snippet generation so that the title is excluded from the content part?
Thanks for your help!


Page content :
Capture d’écran du 2024-10-19 16-53-02

@bglw
Copy link
Contributor

bglw commented Nov 20, 2024

Hi @gustaveWPM 👋

There's no Pagefind setting for this — I'm looking at some ways to do this in the future but there are a couple quirks to solve first.

The best action for now is to use the processResult hook on the DefaultUI to strip out the title.

@gustaveWPM
Copy link
Author

Hi @gustaveWPM 👋

There's no Pagefind setting for this — I'm looking at some ways to do this in the future but there are a couple quirks to solve first.

The best action for now is to use the processResult hook on the DefaultUI to strip out the title.

Hi @bglw!
Thank you for your answer. ^^

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