Skip to content

fix: Don't look for root selectors in pages without data-pagefind-body.#919

Open
shubham-padia wants to merge 1 commit intoPagefind:mainfrom
shubham-padia:pagefind-root-selector
Open

fix: Don't look for root selectors in pages without data-pagefind-body.#919
shubham-padia wants to merge 1 commit intoPagefind:mainfrom
shubham-padia:pagefind-root-selector

Conversation

@shubham-padia
Copy link

Fixes #918.

Pagefind ignores files without data-pagefind-body from indexing, but it still looks at those files when doing the root selector check. This resulted in unnecessary warnings.

Fixes Pagefind#918.

Pagefind ignores files without data-pagefind-body from indexing, but it
still looks at those files when doing the root selector check. This
resulted in unnecessary warnings.
@shubham-padia shubham-padia requested a review from bglw as a code owner September 2, 2025 12:16
@shubham-padia
Copy link
Author

I could not find any tests related to this specific check that I should have modified.

@bglw
Copy link
Member

bglw commented Sep 2, 2025

Hmm I don't think this will work as intended unfortunately. With the default settings, if the html root is missing, nothing gets parsed at all. So d.has_custom_body can never be true.

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.

Do not check for root selector for pages without data-pagefind-body.

2 participants

Comments