AemieJ commented on a change in pull request #444:
URL: https://github.com/apache/camel-website/pull/444#discussion_r468396127
##########
File path: antora-ui-camel/src/js/vendor/algoliasearch.bundle.js
##########
@@ -46,22 +46,22 @@
cancel.style.display = 'block'
index
.search(search.value, {
- hitsPerPage: 10,
+ hitsPerPage: 5,
})
.then((results) => {
const hits = results.hits
const data = hits.reduce((data, hit) => {
const d = {}
d.url = hit.url
var section = hit.hierarchy.lvl0
- if (hit.hierarchy.lvl6 !== null) section = section + ' [' +
hit.hierarchy.lvl6 + ']'
+ if (hit.hierarchy.lvl6 !== null) section = section + '/' +
hit.hierarchy.lvl6
var breadcrumbs = Object.values(hit.hierarchy)
.slice(1)
.filter((lvl) => lvl !== null)
- .join(' » ')
+ .join(' / ')
d.breadcrumbs = ((breadcrumbs !== '') ? breadcrumbs : section)
- d.snippet = hit._snippetResult.content.value + '...'
+ d.snippet =
hit._snippetResult.content.value.split('"').join('') + '...'
Review comment:
Yes, that makes sense, I altered the code to take care of it so it
doesn't split for undefined values. Yes, we use `d.snippet` within the
`summary` tag.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]