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

Should search find documents based on front-matter keywords? #344

Closed
hatton opened this issue Jul 14, 2023 · 4 comments · Fixed by #404 or #405
Closed

Should search find documents based on front-matter keywords? #344

hatton opened this issue Jul 14, 2023 · 4 comments · Fixed by #404 or #405

Comments

@hatton
Copy link

hatton commented Jul 14, 2023

My pages have, for example:

---
title: Unblocking Bloom from Windows Controlled Folder Access
sidebar_position: 5
slug: /windows-controlled-folder-access
keywords: [troubleshooting, Defender, controlled, folder]
---

I find that search will find terms in the title, but not the keywords. For example, I would expect that if I search for "troubleshooting", this document would be listed. Is there something I can do to start indexing on keywords?

@alexchantastic
Copy link

alexchantastic commented Oct 12, 2023

➕ On this feature request!

For now, I've just added some hidden content on my page that includes the keyword. Definitely not ideal though.

I would also expect to be able to search over frontmatter tags:

---
title: My title
tags:
  - Foo
  - Bar
---

@lyleaigbedion
Copy link

Looking for this behaviour as well.

This is available with https://github.com/praveenn77/docusaurus-lunr-search which I switched from due it's lack of style customization

@weareoutman
Copy link
Member

It is possible to make search based on keywords, if they are appeared in the generated HTML.

such as:

<meta name="keywords" content="...">

Currently it is not supported, PRs welcome. If no one is interested in, I'll do it once I got time.

@weareoutman
Copy link
Member

weareoutman commented May 23, 2024

Searching based on keywords (and descriptions) from meta tags (front matter in markdown) is supported via 0.41.0

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