Skip to content

Commit

Permalink
fix: add trailing slashes to search results (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenFluin authored Aug 24, 2024
1 parent 59183b3 commit 5f496a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generate-search-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ function walk(dir) {
// remove file extension, order matters here
const url = filepath
.replace("src/pages", "")
.replace(".astro", "")
.replace(".mdx", "")
.replace(".md", "");
.replace(".astro", "/")
.replace(".mdx", "/")
.replace(".md", "/");
const mtime = stats.mtime.toISOString();
const sha = crypto.createHash("sha256");
sha.update(url);
Expand Down

0 comments on commit 5f496a4

Please sign in to comment.