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 the Bundler Issues page to the search #254

Open
coilysiren opened this issue Sep 14, 2016 · 1 comment
Open

Add the Bundler Issues page to the search #254

coilysiren opened this issue Sep 14, 2016 · 1 comment

Comments

@coilysiren
Copy link
Contributor

ie. http://bundler.io/issues.html, as far as I can tell I can only get to it through google search

@ferdynton
Copy link

Hello @lynnco! I was taking a look about what was going on here and I noticed that source/issues.html.md doesn't have a frontmatter. I tested locally adding

---
title: Issues
description: If you're running into an error, try reading the rest of this page for help.
---

# Bundler Issues
...

to source/issues.html.md and it worked. I'm happy to submit a PR for this if it makes sense.

screen shot 2017-02-08 at 9 58 54 pm

I also noticed other files with similar characteristics not showing, like compatibility.html, conduct.html, older_versions.html and others in the /source directory. These aren't listed as resources to be searched for in config.rb, maybe they should be?

bundlerbot added a commit that referenced this issue Nov 23, 2017
Enable missing pages to be searchable

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

### What was the end-user problem that led to this PR?

The problem was...
- Like @lynncyrin noted in Issue #254, not all pages come up in Bundler.io's search.
### What was your diagnosis of the problem?

My diagnosis was...
Specifically, the missing pages that should be searchable but currently weren't include:
- `compatibility.html`
- `conduct.html`
- `contributors.html`
- `older_versions.html`

### What is your fix for the problem, implemented in this PR?

My fix...
- I read through [the documentation for the Middleman search gem](https://github.com/manastech/middleman-search) that bundler.io uses and found out that in order to make a page searchable, we need to both give the page [frontmatter](https://middlemanapp.com/basics/frontmatter/) (the YAML at the top of the page), and append it to the `search.resources` array in `config.rb`.
- I also deleted `'/doc/contributing/issues.html'` from the `search.resources` array since that page no long exists.
- I also added some CSS to give the search-box result elements a max-width. Otherwise, the width of these elements would be much wider than the search box itself if the page's description was long.
- To illustrate, this is what it would look like without giving the search box element a max-width:
- ![screen shot 2017-10-15 at 6 23 38 pm](https://user-images.githubusercontent.com/15078895/31591885-da9678c0-b1d8-11e7-9393-1e8faea9fca4.png)
- This is what it looks like with a max-width:
- ![screen shot 2017-10-15 at 6 22 35 pm](https://user-images.githubusercontent.com/15078895/31591891-f39e3448-b1d8-11e7-9258-1324f169ee2d.png)

### Why did you choose this fix out of the possible options?
I chose this fix because...
- I think it's important for bundler users to be able to search for all bundler documentation pages.
- I think the CSS change will prevent search-results from looking too big. This will make the CSS more maintainable in the long-run. ✨
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants