Skip to content

Commit d6d417a

Browse files
committed
KTL-3916 fix: include URL hash in search record paths
1 parent ea0c7a0 commit d6d417a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/dist/lib/search/parsers/writerside.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,13 @@ async function docs($: CheerioAPI, url: string) {
174174
}
175175
}
176176

177+
const resolvedUrl = new URL(finalUrl, pageUrl);
178+
177179
const result: SearchRecord = {
178180
...DEFAULT_RECORD,
179181

180182
objectID: finalUrl,
181-
url: new URL(finalUrl, pageUrl).pathname,
183+
url: resolvedUrl.pathname + resolvedUrl.hash,
182184
parent: '/' + url,
183185

184186
headings: headings.reverse().join(' | '),

0 commit comments

Comments
 (0)