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 request] Search any content while returning it's title info,friendly to site generated by markdown #265

Closed
augusttty opened this issue Apr 9, 2023 · 1 comment

Comments

@augusttty
Copy link

augusttty commented Apr 9, 2023

Nowadays, we document things with markdown and convert it into a static html. But the problem is ,due to the flat structure, we cannot locate the result's title information.Which is commonly useful to show the result more user friendly. For example, in pagefind official docs:

Search for "filter inline":

image

Can we locate the title "Tagging a filter inline" based on the search result? See blow:

image
It will be nice if pagefind can search any content while returning it's title info.(Maybe based on some custom html tag attributes?).Or the current api has a capability to handle this?please help if it does.

@bglw
Copy link
Contributor

bglw commented Apr 12, 2023

👋 Hey @augusttty — this seems aligned with the work being done in #215. If using the API on the 0.13.0-alpha.0 you can access some raw information on the page anchors and their location in the content, but there isn't yet a nice wrapper around that, and it doesn't return the text of the anchor. All of that is planned for inclusion in a 1.0 release soon(ish), so it's on the way 🙂

I'll close this copy of the thread, but feel free to pick a conversation back up in #215

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

No branches or pull requests

2 participants