Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override default weight of HTML elements in config #636

Open
SebouChu opened this issue Jun 17, 2024 · 1 comment
Open

Allow to override default weight of HTML elements in config #636

SebouChu opened this issue Jun 17, 2024 · 1 comment
Labels
improvement Not a bug

Comments

@SebouChu
Copy link

SebouChu commented Jun 17, 2024

I would like the possibility to set custom weight values for elements. Is it possible to add something like this in config instead of using the data-pagefind-weight attribute.

Maybe something like :

autoWeights:
  h1: 10
  h2: 9
  p: 1
  ...
@bglw
Copy link
Contributor

bglw commented Jun 26, 2024

Good idea! I'm overdue to rework the configuration internally to allow richer config files (currently it unifies the config file and the CLI arguments, which is blocking complex config structures).

I recently landed a similar config pattern in Flatlake, so once I bring that code back over to Pagefind I can address this (and features like multiple globs) 🙂

@bglw bglw added the improvement Not a bug label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a bug
Projects
None yet
Development

No branches or pull requests

2 participants