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

add search #3

Open
mansona opened this issue Apr 28, 2022 · 0 comments
Open

add search #3

mansona opened this issue Apr 28, 2022 · 0 comments

Comments

@mansona
Copy link
Member

mansona commented Apr 28, 2022

Try using https://github.com/mansona/html-extractor to pull out the relevant parts of the HTML from markdown

Then try one of the frontend-only search indexers to load those objects and build an index https://www.npmtrends.com/elasticlunr-vs-fuse.js-vs-fuzzy-vs-fuzzysearch-vs-lunr-vs-reds-vs-search-index

Altenatively we could just do what mdbook is doing: https://github.com/rust-lang/mdBook/blob/a5fddfa4683e45b1ab6d26629670acfcd5b4f18a/src/renderer/html_handlebars/search.rs#L66

Renders markdown into flat unformatted text and adds it to the search index.

and then we can just use the "flat unformatted text" to feed directly into the index

@mansona mansona assigned locks and mansona and unassigned locks and mansona Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants