File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { CollectionEntry } from "astro:content";
66import { setJumpToState } from " ../globals/state" ;
77import { getCurrentLocale , getUiTranslator } from " ../i18n/utils" ;
88import lodash from " lodash" ;
9+ import { removeLocaleAndExtension } from " ../pages/_utils" ;
910
1011interface Props {
1112 entries: CollectionEntry <" people" >[];
@@ -66,7 +67,10 @@ setJumpToState(null);
6667 <h2 >{ category .label } </h2 >
6768 <ul class = " content-grid" >
6869 { category .members .map ((person ) => (
69- <li class = " col-span-6 md:col-span-9 lg:col-span-12 content-grid" >
70+ <li
71+ id = { removeLocaleAndExtension (person .id )}
72+ class = " col-span-6 md:col-span-9 lg:col-span-12 content-grid"
73+ >
7074 <div class = " col-span-4 md:col-span-9 lg:col-span-4" >
7175 <Image
7276 src = { person .data .image ! }
@@ -101,7 +105,7 @@ setJumpToState(null);
101105 <ul class =" content-grid-simple !gap-y-0" >
102106 {
103107 lodash .shuffle (contributorEntries .members ).map ((person ) => (
104- <li class = " col-span-1" >
108+ <li class = " col-span-1" id = { removeLocaleAndExtension ( person . id ) } >
105109 <a
106110 href = { person .data .url }
107111 aria-label = { ` Link to ${person .data .name }'s personal website' ` }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import keywordExtractor from "keyword-extractor";
1010import { contentTypes } from "../../globals/globals" ;
1111import { supportedLocales as localesWithSearchSupport } from "../../i18n/const" ;
1212import type { LanguageName } from "keyword-extractor/types/lib/keyword_extractor" ;
13+ import { removeLocalePrefix } from "@/src/i18n/utils" ;
1314
1415interface SearchIndex {
1516 [ title : string ] : {
@@ -248,7 +249,12 @@ const generateSearchIndex = async (
248249 break ;
249250 case "people" :
250251 title = data . name ;
251- relativeUrl = `/people/` ;
252+ relativeUrl = `/people/#${ data . name
253+ // copied from people build script
254+ . toLowerCase ( )
255+ . normalize ( "NFD" )
256+ . replaceAll ( / [ \u0300 - \u036f ] / g, "" )
257+ . replaceAll ( / [ . _ < > * % \\ / ] / g, "-" ) } `;
252258 break ;
253259 case "events" :
254260 title = data . title ;
You can’t perform that action at this time.
0 commit comments