Skip to content

Exclude header and footer from pagefind analysis#638

Open
sebbASF wants to merge 1 commit intomainfrom
preview/search-body-only
Open

Exclude header and footer from pagefind analysis#638
sebbASF wants to merge 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
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.

2 participants