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

Search in YAML headers #1243

Closed
ghost opened this issue Jun 23, 2017 · 5 comments
Closed

Search in YAML headers #1243

ghost opened this issue Jun 23, 2017 · 5 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jun 23, 2017

Is it possible to search in YAML headers, like this:

---
author: Me
---
Foo

I want to find "Me" if I search it

@waylan waylan added this to the 1.0.0 milestone Jun 23, 2017
@waylan
Copy link
Member

waylan commented Jun 23, 2017

No, not at this time. However, that may be something that might be added when the search feature gets refactored. I've added this to the (already long) list of issues in that project.

@waylan
Copy link
Member

waylan commented Jun 23, 2017

Oh and that is not YAML, but multimarkdown style meta-data.

@waylan waylan added the Plugins label Nov 1, 2017
@waylan
Copy link
Member

waylan commented Feb 2, 2018

Not really sure how this would work. Should the entire meta-data section be indexed as a block of text or should each individual key be indexed? I doubt we should index all keys (template for example makes no sense). I suppose a set of keys could be defined in the config. Maybe something like:

plugins:
    - search:
        index_meta_data: [author, summary]

Then for any page which has those meta-data keys assigned, they get indexed.

Any thoughts from someone who wants/needs this feature?

@noraj
Copy link
Contributor

noraj commented Jul 25, 2019

@waylan related to #1828, yead letting the user the possibility to configure the YAML key to be indexed is better than indexing all by default as you said. But some default key like tags, title, or description/summary should be indexed by default.

@pawamoy
Copy link
Sponsor Contributor

pawamoy commented Apr 15, 2024

Nowadays (2024) lunr.js is unmaintained (last commit 2020). While we welcome enhancements to existing themes, we're also discussing creating a new, better default theme, which would probably use something else than lunr.js. @squidfunk also stated that he and his team are working on a standalone search plugin that is theme-agnostic and will bring such functionality, see the discussion starting here #3560 (comment).

For these reasons, we'll close this as not planned! If someone wants to work on this anyway, we can re-open the issue.

@pawamoy pawamoy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants