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

[Query] Is it MiniSearch could not index frontmatter fields? #3083

Closed
HelloYu opened this issue Oct 13, 2023 · 6 comments
Closed

[Query] Is it MiniSearch could not index frontmatter fields? #3083

HelloYu opened this issue Oct 13, 2023 · 6 comments

Comments

@HelloYu
Copy link

HelloYu commented Oct 13, 2023

I have some markdown files transform from WordPress, only have frontmatter title field, in markdown content do not have # h1 mark, and I found out the MiniSearch could not search by frontmatter title, and I read some VitePress and MiniSearch docs, didn't find any useful information, anyone can tell me, how can I configuring to support this feature?

@brc-dd
Copy link
Member

brc-dd commented Oct 13, 2023

@HelloYu
Copy link
Author

HelloYu commented Oct 13, 2023

@brc-dd Thanks! you save my day, i don't read this page, even I went to read the VitePress source code.

@HelloYu HelloYu closed this as completed Oct 13, 2023
@renqian805
Copy link

Refer https://vitepress.dev/reference/default-theme-search#example-transforming-content-adding-anchors

Reproduction

It appears that it cannot fully solve my problem.

image

@HelloYu
Copy link
Author

HelloYu commented Oct 13, 2023

Refer https://vitepress.dev/reference/default-theme-search#example-transforming-content-adding-anchors

Reproduction

It appears that it cannot fully solve my problem.

image

#3024 not release yet.

@brc-dd
Copy link
Member

brc-dd commented Oct 13, 2023

Yeah that would be fixed with #3032 (#3024). The solution I mentioned only helps if you're adding frontmatter title via layout.

@renqian805
Copy link

Thanks! I'm looking forward to it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants