A calm place to write long-form, and publish it to the open social web. skypress.blog/
0

Configure Feed

Select the types of activity you want to include in your feed.

Point reader bio mention/hashtag links at mu.social

+7 -8
+4 -4
src/lib/reader/rich-text.test.ts
··· 32 32 { 33 33 type: 'link', 34 34 text: '@alice.bsky.social', 35 - href: 'https://bsky.app/profile/alice.bsky.social', 35 + href: 'https://mu.social/profile/alice.bsky.social', 36 36 }, 37 37 ] ); 38 38 } ); ··· 40 40 it( 'links a hashtag to its Bluesky hashtag page', () => { 41 41 expect( detectBioSegments( 'love #design' ) ).toEqual( [ 42 42 { type: 'text', text: 'love ' }, 43 - { type: 'link', text: '#design', href: 'https://bsky.app/hashtag/design' }, 43 + { type: 'link', text: '#design', href: 'https://mu.social/hashtag/design' }, 44 44 ] ); 45 45 } ); 46 46 ··· 52 52 { 53 53 type: 'link', 54 54 text: '@alice.bsky.social', 55 - href: 'https://bsky.app/profile/alice.bsky.social', 55 + href: 'https://mu.social/profile/alice.bsky.social', 56 56 }, 57 57 { type: 'text', text: ' ' }, 58 - { type: 'link', text: '#design', href: 'https://bsky.app/hashtag/design' }, 58 + { type: 'link', text: '#design', href: 'https://mu.social/hashtag/design' }, 59 59 { type: 'text', text: ' ' }, 60 60 { type: 'link', text: 'example.com', href: 'https://example.com' }, 61 61 ] );
+3 -4
src/lib/reader/rich-text.ts
··· 10 10 * Returns ordered segments; the caller renders them with auto-escaping, never `set:html`. 11 11 */ 12 12 import { RichText } from '@atproto/api'; 13 + import { atmosphereProfileUrl, atmosphereHashtagUrl } from '../social/atmosphere-url'; 13 14 14 15 export type BioSegment = 15 16 | { type: 'text'; text: string } ··· 46 47 href = safeHttpHref( segment.link.uri ); 47 48 } else if ( segment.isMention() ) { 48 49 const handle = segment.text.replace( /^@/, '' ); 49 - href = handle 50 - ? `https://bsky.app/profile/${ encodeURIComponent( handle ) }` 51 - : null; 50 + href = handle ? atmosphereProfileUrl( handle ) : null; 52 51 } else if ( segment.isTag() ) { 53 52 const tag = segment.text.replace( /^#/, '' ); 54 - href = tag ? `https://bsky.app/hashtag/${ encodeURIComponent( tag ) }` : null; 53 + href = tag ? atmosphereHashtagUrl( tag ) : null; 55 54 } 56 55 57 56 segments.push(