mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 15:56:29 -05:00
Bug fix
This commit is contained in:
parent
d3d0669c0d
commit
a821794a91
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ function initUI () {
|
|||
function renderResults (results) {
|
||||
var $searchResults = $('#searchResults')
|
||||
var query = $('#searchBox').val()
|
||||
var SUMMARY_INCLUDE = 100
|
||||
var SUMMARY_INCLUDE = 50
|
||||
var MAX_PAGES = 10
|
||||
|
||||
// Clear search result
|
||||
|
@ -84,7 +84,7 @@ function renderResults (results) {
|
|||
var matchPosition = result.body.indexOf(query.split(' ')[0])
|
||||
var bodyStartPosition = matchPosition - SUMMARY_INCLUDE > 0 ? matchPosition - SUMMARY_INCLUDE : 0
|
||||
$searchResultPage.append('<a class="searchResultTitle" href="' + result.ref + '">' + result.title + '</a>')
|
||||
$searchResultPage.append('<div class="searchResultBody">' + result.body.substr(bodyStartPosition, SUMMARY_INCLUDE) + '</div>')
|
||||
$searchResultPage.append('<div class="searchResultBody">' + result.body.substr(bodyStartPosition, SUMMARY_INCLUDE * 2) + '</div>')
|
||||
$searchResults.append($searchResultPage)
|
||||
|
||||
// Highlight keyword
|
||||
|
|
Loading…
Reference in a new issue