replace URL path for inlined SearchMarkers - fixes #1154
The search index looks like:
```ts
[
{
id: 'foo', label: 'security',
path: '/settings/security', inlining: ['2fa'],
},
{
id: '2fa',
label: 'two-factor auth',
path: '/settings/2fa', // guessed wrong by the index generation
},
{
id: 'aaaa',
parentId: '2fa',
label: 'totp',
},
…
]
```
This file post-processes that index and re-parents the inlined
sections. Problem was, it left the (wrong) `path` untouched.
Replacing the `path` makes the search work fine.
This commit is contained in:
parent
05a499ac55
commit
8b1a0f1226
1 changed files with 1 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ for (const item of generated) {
|
|||
const inline = rootMods.get(id);
|
||||
if (inline) {
|
||||
inline.parentId = item.id;
|
||||
inline.path = item.path;
|
||||
} else {
|
||||
console.log('[Settings Search Index] Failed to inline', id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue