docsify
docsify copied to clipboard
Make search stop showing markdown and/or HTML syntax in search results
Feature request
Make search stop showing markdown and/or HTML syntax in search results
What problem does this feature solve?
Showing markdown and html syntax in search results is not the expected behavior for full text search. It should return rendered text with no syntax.
What does the proposed API look like?
How should this be implemented in your opinion?
Are you willing to work on this yourself?
We notice this problem also but there havnt had an ideal way to solve it yet. we may plan to use some search plugins to make it.
@noahniuwa I found out a solution, use lurn https://github.com/kiwicom/docsify-lunr-search maybe fix this problem. However, Lunr not really better current search in docsify but it can fix this problem.
Anyone have leads on this issue? I am experimenting with supporting Search with Docsify-This.net and seeing this issue too - for example, search for "Welcome". https://paulhibbitts.github.io/test-docsify-this/?basePath=https://raw.githubusercontent.com/hibbitts-design/docsify-this-multiple-page-course-site/main&homepage=home.md&sidebar=true&loadSidebar=_sidebar.md&loadNavbar=_navbar.md&search=true
UPDATE: I customized the Search.js code to not include certain HTML items https://github.com/paulhibbitts/test-docsify-this/blob/main/docs/assets/vendor/docsify/plugins/custom/search.js#L228-L234
These libraries look like promising options for removing markdown/HTML markup from our search results:
- https://github.com/danestves/markdown-to-text
- https://github.com/ejrbuss/markdown-to-txt