085385c3e48a4d5ec6c9ec85dacde442e410a061
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.
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%