Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #345 - arbonap:pa-add-to-search, r=colby-swandale
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. ✨
- Loading branch information