forked from game-ci/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
algolia.config.js
29 lines (28 loc) · 856 Bytes
/
algolia.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = {
indexName: 'game',
pathsToMatch: ['https://game.ci/**'],
recordExtractor: ({ $, helpers }) => {
// priority order: deepest active sub list header -> navbar active item -> 'Documentation'
const lvl0 =
$('.menu__link.menu__link--sublist.menu__link--active, .navbar__item.navbar__link--active')
.last()
.text() || 'Documentation';
return helpers.docsearch({
recordProps: {
lvl0: {
selectors: '',
defaultValue: lvl0,
},
lvl1: 'header h1',
lvl2: 'article h2',
lvl3: 'article h3',
lvl4: 'article h4',
lvl5: 'article h5, article td:first-child',
lvl6: 'article h6',
content: 'article p, article li, article td:last-child',
},
indexHeadings: true,
aggregateContent: true,
});
},
};