-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search: Include results from the new api.qunitsjs.com index
* Add a second autocomplete source for the 'qunitjs-api' Algolia index that exits as of qunitjs/qunit@2486b22829d5e. * Fix its URLs to start with https://api.qunitjs.com as otherwise the links are 404 Not Found. The indexer part of jekyll-algolia indexes based on local context only. This means it can index new content during the Travis build, but also means it's not aware of the "real" URL when queried from a sibling site. There might be an official way to do this, but I couldn't find one. * Fix the empty() template for "No results" to be part of the shared 'templates' options rather than per-source as otherwise the message will render twice if neither index has results. * Change the '& + &' border-top rule for lines between results to now be at the top of all results including the first one. This is needed because each source has its own aa-suggestions wrapper and thus the line between the last API result and first main site result would otherwise be missing. The line is subtle enough that it seems invisible to me at the edge between white and dark purple, but we could make it more invisible with a negative margin, or with some more elaborate selectors or by somehow making autocomplete.js merge the results before rendering. I haven't done either for now as this seems simpler and good enough. Other improvements: * Make use of the heading information from Algolia's index. The makes results render as: - Plugins › qunit-assert-step A QUnit plugin for asserting the proper sequence… Instead of: - Plugins A QUnit plugin for asserting the proper sequence… * Make use of the anchor information from Algolia's index. This makes the result URL and its on-click behaviour jump straight to the relevant heading. * Remove `<div class="aa-empty">` wrapper. It seems autocomplete.js already does this, which mean it was actually generating div.aa-empty>div.aa-empty and thus a double margin. This was fixed. * Exclude the no-js /guides/ page from the index since it only contains summaries of the pages it links to and distracts in results. Closes qunitjs/qunit#1460.
- Loading branch information
Showing
3 changed files
with
76 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters