Skip to content

Commit

Permalink
fix(search-index): use en-US popularities for German
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Nov 29, 2024
1 parent 450e433 commit dbd9ce0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/search-index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPopularities } from "../content/index.js";

// getPopularities() is memoized so it's fast to call repeatedly
const getPopularity = (item) => getPopularities().get(item.url) || 0;
const getPopularity = (item) =>
getPopularities().get(item.url.replace("/de/docs/", "/en-US/docs/")) || 0;

type Locale = string;
interface SearchItem {
Expand Down

0 comments on commit dbd9ce0

Please sign in to comment.