@@ -5,11 +5,13 @@ import Prose from "../../components/prose/prose.astro";
55import { Separator } from " ../../components/separator/separator" ;
66import { formatInTimeZone } from " date-fns-tz" ;
77import { YouTube } from " @astro-community/astro-embed-youtube" ;
8+ import { Picture } from " astro:assets" ;
9+ import Markdown from " @ui/Markdown.astro" ;
810
911export async function getStaticPaths() {
1012 const sessions = await getCollection (" sessions" );
1113 return sessions .map ((entry ) => ({
12- params: { slug: entry .slug },
14+ params: { slug: entry .id },
1315 props: { entry },
1416 }));
1517}
@@ -18,15 +20,9 @@ export async function getStaticPaths() {
1820const sessions = await getCollection (" sessions" );
1921
2022const { entry } = Astro .props ;
21- const { Content } = await entry .render ();
2223
2324const speakers = await getEntries (entry .data .speakers );
2425
25- for (const speaker of speakers ) {
26- // @ts-ignore
27- speaker .Content = (await speaker .render ()).Content ;
28- }
29-
3026// Resolve session codes to session data
3127const resolveSessions = (codes : string []) =>
3228 codes .map ((code ) => sessions .find ((s ) => s ?.data ?.code === code ));
@@ -106,7 +102,6 @@ const nextSessionsOrdered = sameRoomNextSession
106102
107103 <Prose >
108104 <h2 >Abstract</h2 >
109- <Content />
110105 </Prose >
111106
112107 {
@@ -155,11 +150,14 @@ const nextSessionsOrdered = sameRoomNextSession
155150 <div class = " md:grid grid-cols-[260px_1fr] md:gap-6" >
156151 { speaker .data .avatar ? (
157152 <div class = " flex items-start" >
158- <img
159- src = { speaker .data .avatar }
160- alt = { speaker .data .name }
161- class = " w-full max-w-sm mb-12"
162- />
153+ <div class = " border-4 border-white rounded-lg shadow-lg inline-block mb-10" >
154+ <Picture
155+ src = { speaker .data .avatar }
156+ alt = { speaker .data .name }
157+ inferSize = { true }
158+ class = " max-w-[240px] sm:max-w-[540px] xl:max-w-[720px] max-h-[240px] sm:max-h-[540px] xl:max-h-[720px] object-scale-down"
159+ />
160+ </div >
163161 </div >
164162 ) : (
165163 <div class = " flex items-start mb-4 invisible" >
@@ -169,15 +167,14 @@ const nextSessionsOrdered = sameRoomNextSession
169167 <div >
170168 <p class = " mb-4" >
171169 <a
172- href = { ` /speaker/${speaker .slug } ` }
170+ href = { ` /speaker/${speaker .id } ` }
173171 class = " text-4xl hover:text-primary-hover underline font-bold"
174172 >
175173 { speaker .data .name }
176174 </a >
177175 </p >
178176 <Prose >
179- { /* @ts-ignore */ }
180- <speaker.Content />
177+ <Markdown content = { speaker .data .biography || " " } />
181178 </Prose >
182179 </div >
183180 </div >
@@ -201,7 +198,7 @@ const nextSessionsOrdered = sameRoomNextSession
201198 { parallelSessions .map ((session : any ) => (
202199 <li >
203200 <Prose >
204- <a href = { ` /session/${session .slug } ` } >
201+ <a href = { ` /session/${session .id } ` } >
205202 { session .data .title }
206203 </a >
207204 </Prose >
@@ -219,7 +216,7 @@ const nextSessionsOrdered = sameRoomNextSession
219216 { nextSessionsOrdered .map ((session : any ) => (
220217 <li >
221218 <a
222- href = { ` /session/${session .slug } ` }
219+ href = { ` /session/${session .id } ` }
223220 class = { ` ${session === sameRoomNextSession ? " text-primary font-bold" : " " } ` }
224221 >
225222 { session .data .title }
0 commit comments