Skip to content

Commit

Permalink
implement search term highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Lowinske committed Mar 21, 2018
1 parent 114ee99 commit 63414c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions css/components/_algolia.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.algolia-docsearch-suggestion--highlight { font-weight: bold; }
3 changes: 3 additions & 0 deletions css/customstyles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions css/customstyles.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions css/customstyles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -557,3 +557,4 @@ a.accordion-toggle {
@import "components/copy-clipboard";
@import "components/version-tag";
@import "components/comparison-chart";
@import "components/algolia";
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
var r = $('<div/>', {class: 'search-item'});
r.append(h);
r.append($('<div/>', {class: 'search-link'}).html(hit.url));
r.append($('<div/>', {class: 'search-snippet'}).html(hit.content));
r.append($('<div/>', {class: 'search-snippet'}).html(hit._highlightResult.content.value));
div.append(r);
});
} else {
Expand Down

0 comments on commit 63414c8

Please sign in to comment.