mdx-js / mdx

Markdown for the component era
https://mdxjs.com
MIT License
17.43k stars 1.14k forks source link

Add site search to the new MDX website #1776

Closed ChristianMurphy closed 1 week ago

ChristianMurphy commented 2 years ago

Subject of the feature

Have a way to search all documentation pages on the website.

Problem

Currently there is no way to search for specific content on the MDX site itself. Adopters either have to click through pages looking for where a relevant section is, or to go off the website to a search engine and do a site scoped search from there. For example if I'm looking for the Vue guide, I have go click through the site until I eventually find https://v2.mdxjs.com/packages/vue/#use several layers of navigation in.

Expected behavior

Have a way to search the documentation built into the site

Alternatives

Potential solutions

wooorm commented 2 years ago

Algolia was used in the v1 site: https://github.com/mdx-js/mdx/blob/master/packages/gatsby-theme-mdx/src/components/search.js.

mizozobu commented 2 years ago

This is probably the easiest way to integrate algolia to an OSS documentation site and probably this project can be listed on docsearch's homepage.

https://docsearch.algolia.com

shortcuts commented 1 year ago

Hey there! I can confirm DocSearch was running for the v1 website, and we still have the setup up and running!

I've made a (really basic) update on our side just to make it work for the current website, csb - live demo

You can use the credentials you see on the sandbox, they are yours and public so no worry about disclosing it. For the account owner, I see @johno so let me know if I should send a new invite or add someone else :)

wooorm commented 1 week ago

Done!

@shortcuts appreciate you looking in.

I believe I do not have access to algolia. John isn’t really active here anymore. Could you add me? Thanks!

wooorm commented 1 week ago

Oh, and two things, for you as a maintainer of these libraries: