I tried assigning a data-pagefind-weight to whole layouts, to make content with specific layouts rank higher. In my limited testing, this doesn't seem to work, possibly due to nested data-pagefind-weight and data-pagefind-body attributes.
I couldn't find in the docs on weighting if nested weighting attributes are ignored, multiplied or even allowed to begin with.
I've got several questions that I'd be happy to address via a PR to the docs, if I knew the answers.
<body data-pagefind-weight="5">
<article data-pagefind-body>
<h1>Title</h1>
<p data-pagefind-weight="1">Paragraph</p>
</article>
</body>
- Does
<h1> have weight 5 or the default for <h1> of 7?
- Does
<p> have weight 5 * 1 = 5, 1 (which is set on the tag) or 5 (inherited from <body>)?
- Should the outcomes be different if
data-pagefind-weight="5" is applied to <body>? (Is it even considered if it appears outside a tag with a data-pagefind-body?)
I tried assigning a
data-pagefind-weightto whole layouts, to make content with specific layouts rank higher. In my limited testing, this doesn't seem to work, possibly due to nesteddata-pagefind-weightanddata-pagefind-bodyattributes.I couldn't find in the docs on weighting if nested weighting attributes are ignored, multiplied or even allowed to begin with.
I've got several questions that I'd be happy to address via a PR to the docs, if I knew the answers.
<h1>have weight 5 or the default for<h1>of 7?<p>have weight 5 * 1 = 5, 1 (which is set on the tag) or 5 (inherited from<body>)?data-pagefind-weight="5"is applied to<body>? (Is it even considered if it appears outside a tag with adata-pagefind-body?)