Skip to content

Commit

Permalink
fix(search): remove extra /index from routes
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Apr 16, 2023
1 parent 7dfe9d2 commit 9e04b43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node/plugins/localSearchPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export async function localSearchPlugin(
let relFile = path.relative(siteConfig.srcDir, file)
relFile = siteConfig.rewrites.map[relFile] || relFile
let id = path.join(siteConfig.site.base, relFile)
id = id.replace(/\/index\.md$/, '/')
id = id.replace(/\.md$/, siteConfig.cleanUrls ? '' : '.html')
return id
}
Expand Down

0 comments on commit 9e04b43

Please sign in to comment.