File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ async function getCollectionsData() {
8787 await ensureCacheDir ( ) ;
8888
8989 const speakersBuffer = await fetchWithCache (
90- "https://gist.github .com/egeakman/469f9abb23a787df16d8787f438dfdb6 /raw/62d2b7e77c1b078a0e27578c72598a505f9fafbf /speakers.json" ,
90+ "https://gist.githubusercontent .com/nikoshell/d8efd41f90961cc6298519c0eec04843 /raw/d13a7b1d35f61be1773404e7faf8395dd4862313 /speakers.json" ,
9191 "speakers.json"
9292 ) ;
9393
@@ -148,6 +148,7 @@ const speakers = defineCollection({
148148 gitx : z . string ( ) . nullable ( ) ,
149149 linkedin_url : z . string ( ) . url ( ) . nullable ( ) ,
150150 mastodon_url : z . string ( ) . url ( ) . nullable ( ) ,
151+ bluesky_url : z . string ( ) . url ( ) . nullable ( ) ,
151152 twitter_url : z . string ( ) . url ( ) . nullable ( ) ,
152153 } ) ,
153154} ) ;
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ function getTwitterUsername(url: string): string | undefined {
3838 return (username ?? url ).startsWith (" @" ) ? username : ` @${username } ` ;
3939}
4040
41+ // Get @username from Twitter URL
42+ function getBlueskyUsername(url : string ): string | undefined {
43+ const username = url .split (" /" ).pop ();
44+ return (username ?? url ).startsWith (" @" ) ? username : ` @${username } ` ;
45+ }
46+
4147// Get @[email protected] from Mastodon URL4248function getMastodonUsername(url : string ): string | null {
4349 const match = url .match (/ https? :\/\/ ([^ \/ ] + )\/ @([^ \/ ] + )(\/ | \? | $ )/ );
@@ -197,6 +203,19 @@ function getGitHosting(url: string): string | undefined {
197203 </dd >
198204 </>
199205 )}
206+ { entry .data .bluesky_url && (
207+ <>
208+ <dt class = " font-bold" >Bluesky</dt >
209+ <dd >
210+ <a
211+ href = { entry .data .bluesky_url }
212+ class = " text-primary underline hover:text-primary-hover"
213+ >
214+ { getBlueskyUsername (entry .data .bluesky_url )}
215+ </a >
216+ </dd >
217+ </>
218+ )}
200219 </dl >
201220 </div >
202221 ) : null
You can’t perform that action at this time.
0 commit comments