Skip to content

Exclude header and footer from pagefind analysis#638

Merged
sebbASF merged 1 commit intomainfrom
preview/search-body-only
Apr 3, 2026
Merged

Exclude header and footer from pagefind analysis#638
sebbASF merged 1 commit intomainfrom
preview/search-body-only

Conversation

@sebbASF
Copy link
Copy Markdown
Contributor

@sebbASF sebbASF commented Mar 5, 2026

At present, the contents of page headers and footers are included in the pagefind search.

This means that it is very difficult to search for actual references to words that appear in a header or footer.
For example, a search for Newsroom generates 175 hits, most of which are just links.

However, with the PR applied, there are just two hits:
https://www-search-body-only.staged.apache.org/

@sebbASF sebbASF requested a review from Paul-TT March 5, 2026 15:23
@sebbASF sebbASF requested review from bproffitt March 19, 2026 00:09
@bproffitt
Copy link
Copy Markdown
Contributor

@Paul-TT did you ever test this? I believe you asked me about it a couple weeks ago.

@sebbASF
Copy link
Copy Markdown
Contributor Author

sebbASF commented Mar 19, 2026

There is a preview site which shows it in action, see initial comment.

@sebbASF sebbASF requested a review from hen March 25, 2026 11:58
@sebbASF sebbASF requested a review from dave2wave April 3, 2026 10:22
Copy link
Copy Markdown
Member

@dave2wave dave2wave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@sebbASF sebbASF merged commit ac0279d into main Apr 3, 2026
@sebbASF sebbASF deleted the preview/search-body-only branch April 3, 2026 14:30
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

Successfully merging this pull request may close these issues.

3 participants