Skip to content

Commit 63274d4

Browse files
authored
Merge pull request #18275 from github/repo-sync
repo sync
2 parents d99410a + 45c4994 commit 63274d4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

script/search/build-records.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ export default async function buildRecords(
6262
.on('page', (page) => {
6363
process.stdout.write(pageMarker)
6464
const newRecord = parsePageSectionsIntoRecords(page)
65-
const hrefWithoutLocale = page.href.split('/').slice(2).join('/')
66-
67-
const popularity = (hasPopularPages && popularPages[hrefWithoutLocale]) || 0.0
65+
const pathArticle = page.relativePath.replace('/index.md', '').replace('.md', '')
66+
const popularity = (hasPopularPages && popularPages[pathArticle]) || 0.0
6867
newRecord.popularity = popularity
6968
process.stdout.write(recordMarker)
7069
records.push(newRecord)

0 commit comments

Comments
 (0)