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

Searching for "tabs" on v4 docs site doesn't return nav page #21125

Closed
Daniel15 opened this issue Nov 13, 2016 · 10 comments
Closed

Searching for "tabs" on v4 docs site doesn't return nav page #21125

Daniel15 opened this issue Nov 13, 2016 · 10 comments

Comments

@Daniel15
Copy link
Contributor

Go to https://v4-alpha.getbootstrap.com/getting-started/introduction/ and search for "tabs"
Expected: https://v4-alpha.getbootstrap.com/components/navs/ is returned
Actual: "Sorry, there are no results for that search."

@browner12
Copy link
Contributor

TBH, the whole search functionality is sorely lacking. It seems very basic, and just looks for specific page names. It would be nice to see a full search engine in here. maybe something like Algolia.

@Daniel15
Copy link
Contributor Author

Daniel15 commented Nov 13, 2016

Yeah Algolia seems to work pretty well - We're using it on a bunch of Facebook project sites now (React, Yarn, Flow, and a few others). On the other hand, even a Google search box would be useful :)

@bardiharborow
Copy link
Member

This is on the roadmap over at #17021 (under Docs). Currently we use christian-fei/Simple-Jekyll-Search. Pull requests would likely be accepted for this, but I would suggest discussing the choice of service with mdo on Slack before you implement.

@pixelastic
Copy link
Contributor

Hey all,

React, React Native, Yarn and others are using DocSearch. It's a great improvement over the previous PR (#16901) that was using a Jekyll plugin and custom JS code.

DocSearch is a crawler we run on our side (I work at Algolia), that will look at the markup of the documentation website and extract content (titles, subtitles, content, etc), push it to Algolia and make it publicly available. We've also developed a JS lib (hosted on various CDNs) that will only require a few lines on your side to instanciate and bind to an input.

The product itself is completly free, no Algolia account needed and all the code is open-source (you can even run the crawler yourself if you want). As it's on a cron every 24h, you don't have anything to add to your build steps.

Let me know if you need any more information, I'd be happy to help.

@mdo
Copy link
Member

mdo commented Nov 15, 2016

Yeah, we definitely to improve what's there today. I implemented the current v4 docs search long ago as a first step to getting easier navigation in there. It's missing page content, keyboard shortcuts, and more compared to other solutions. But it was easy for me to implement. 😁

@mdo
Copy link
Member

mdo commented Nov 26, 2016

@pixelastic Let's see this through for v4 :).

My main concern is being able to keep docs up to date locally as I develop things. New pages get added, headings changed, page content rewritten. How do we balance indexing public pages that get deployed one every couple months with local development? Ideally we'd run a Grunt (or Gulp or npm) task to generate those things as we go.

@pixelastic
Copy link
Contributor

pixelastic commented Nov 26, 2016

DocSearch itself is a crawler, self-contained in a Docker image, that only takes some urls and CSS selectors as input. We do run a version on a regular cron on our infra for ease of use, but the Docker image is publicly available and you could run it on demand. The front-end search can then be queried through a js lib we also provide.

So for your development concerns what you could do is create an npm run index-docs script that will run the docker image and index your current content. You would just have to make it target localhost while in dev, and push records in a different index than the one in prod. Then it will just be a matter of having a flag in your build process to specify if it's for dev or prod.

This would only require minor tweaks on our side to make it work, but if the idea sounds ok with you we could get started :)

@Daniel15
Copy link
Contributor Author

self-contained in a Docker image

@pixelastic - The readme in that repo doesn't seem to mention a Docker image, it just has instructions on how to manually install it (install Python, run pip, etc). If there is a Docker image, it'd be worth mentioning the Docker instructions above the manual installation instructions :)

@mdo mdo modified the milestones: v4.1 ideas, v4.0.0-beta Jan 2, 2017
@lode
Copy link

lode commented Jan 9, 2017

Apart from search & technical wishes, I loved the old docs and really dislike the v4 ones in terms of navigation. The old navigation gives good overview everywhere with a topnav for the big navigation and the affix subnav for in-page. I've been giving the new docs some tries over time and every time find it hard to navigate, know what link does what, how to know what's in a page (that's only in the TOC which scrolls away), etc.

Probably you're already aware of this, but you never know.

@mdo mdo mentioned this issue May 27, 2017
5 tasks
@mdo
Copy link
Member

mdo commented Jun 7, 2017

Should be much improved with #22715 and #22716.

@mdo mdo closed this as completed Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants