dualfroz 085385c3e4 feat: apply Pagefind attributes by selector through config rules
exclude_selectors is the only way the config can reach into a page, and it
carries the semantics of data-pagefind-ignore="index". Every other control
Pagefind has lives on an attribute, so reaching it from the config meant a
new flag per attribute.

Add a rules list that pairs a selector with the attributes to set on the
elements it matches. The attributes are applied before every other handler,
so the rest of the parser reads them exactly as if the page had carried
them, and every documented attribute is reachable without new flags.

An attribute already present on the element wins, so a rule never overrides
markup. A selector that cannot be parsed is reported and skipped.

Rules are config-file only: a list of selectors with attribute maps does not
fit a CLI flag or an environment variable.
2026-09-23 10:26:08 +02:00
S
Description
My contributions to Pagefind/pagefind: 10 commits, 1 merged PRs
146 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 62.4%
TypeScript 17.3%
Python 8%
Svelte 6.9%
JavaScript 5.4%