Replies: 1 comment
-
Pagefind doesn't consider this hierarchy, no. In fact, I don't think browsers do either. HTML5 outlining was never implemented, so for browser & screenreader purposes all documents are flat and those h1 elements are equal. I think if Pagefind were to support anything like this it would come in the form of a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm testing Pagefind to index a website of more than 5,000 pages and I'm impressed with the results. Congatulations!
As you know HTML5 has the concept of "sections", allowing each
<section>
,<article>
,<nav>
,<aside>
, etc., to contain its own hierarchy of headings. Within each sectioning the<h1>
represents the highest-level heading.We have excluded header and navigation sections from indexing via "exclude_selector" but the main content has several nested sections with their own header structures starting with H1. To honor this hierarchy, the weight of the headings in the index should increase as they go deeper. First section H1 should weigh as an H2, H2 as an H3, etc. Second nested H1 should weigh as an H3, H2 as an H4, and so on.
Can anyone explain if Pagefind considers this hierarchy.
Thank you very much
Beta Was this translation helpful? Give feedback.
All reactions