We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d99410a + 45c4994 commit 63274d4Copy full SHA for 63274d4
script/search/build-records.js
@@ -62,9 +62,8 @@ export default async function buildRecords(
62
.on('page', (page) => {
63
process.stdout.write(pageMarker)
64
const newRecord = parsePageSectionsIntoRecords(page)
65
- const hrefWithoutLocale = page.href.split('/').slice(2).join('/')
66
-
67
- const popularity = (hasPopularPages && popularPages[hrefWithoutLocale]) || 0.0
+ const pathArticle = page.relativePath.replace('/index.md', '').replace('.md', '')
+ const popularity = (hasPopularPages && popularPages[pathArticle]) || 0.0
68
newRecord.popularity = popularity
69
process.stdout.write(recordMarker)
70
records.push(newRecord)
0 commit comments