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

feature: add all frontmatter data to search index #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KonnorRogers
Copy link
Member

@KonnorRogers KonnorRogers commented Sep 19, 2023

Why?

Because the lunr search engine does not guarantee order. By passing along all frontmatter, you could sort your posts by something like "date" for example when you query for all your posts, you may want to sort by "date"

Other key considered

"frontmatter" instead of "data", but "data" felt like it was more aligned with document.data

@jaredcwhite
Copy link
Member

Apologies for the absurdly late comment on this…I'm interested in the idea but I'm concerned it could mean the size of the generated search index is greatly increased if all frontmatter gets included. Maybe this is an opt-in feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants