vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

[Feature request] Index page contents also in Search #348

Closed ramesh-dada closed 2 years ago

ramesh-dada commented 2 years ago

Feature request

Description

I seen that in the built in search whenever we search it only have indexed the page headings not contents but in algolia if i search page contents then also it gives me accurate results, So it will be great if VuePress in built search will also include contents of the page.

Proposed Solution

We should include page contents here https://github.com/vuepress/vuepress-next/blob/main/packages/%40vuepress/plugin-search/src/client/components/SearchBox.ts#L137 and It should also highlight the text which is entered in search input like algolia.

meteorlxy commented 2 years ago

See https://github.com/vuepress/vuepress-next/issues/347#issuecomment-893378017

ramesh-dada commented 2 years ago

Hello I seen that chartjs vuepress site is using this type of search image It will be great if it will be present in core and people will no longer need algolia so no complications.

meteorlxy commented 2 years ago

Seems that it is supported by https://github.com/z3by/vuepress-plugin-flexsearch.

No need to include all community plugins into core.

ramesh-dada commented 2 years ago

hello meteorlxy Thanks a Lot but that developer is offline and maybe not going to update it so what's the procedure to request update for a community plugin?

meteorlxy commented 2 years ago

You can fork one and make a plugin yourself. This is open source.

ramesh-dada commented 2 years ago

But I don't know how to code very properly I am learning so will you help?

Mister-Hope commented 2 years ago

That's your own thing man. Currently I think we should make vuepress2 more stable and moving to have its stable release after Vue3.2

And even if meteorlxy has time, I think plugins like blog should be supported first.

At least you have alternatives now.

ramesh-dada commented 2 years ago

@Mister-Hope Please 🙏 any link or source to the alternative's

Mister-Hope commented 2 years ago

@Mister-Hope Please 🙏 any link or source to the alternative's

The algolia should be an alternative.

If you are making docs, you can apply one free.

Even not, algolia still provides free plans and the amount should be enough for small sites.