File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -51,21 +51,27 @@ export async function GET(context: APIContext) {
5151 } ;
5252
5353 const image = getPostImage ( post ) ;
54+ const imageUrl = `${ site } ${ image . src } ` ;
55+ const imageType = getMimeType ( image . src ) ;
56+
5457 item . enclosure = {
55- url : ` ${ site } ${ image . src } ` ,
56- type : getMimeType ( image . src ) ,
58+ url : imageUrl ,
59+ type : imageType ,
5760 length : 0 ,
5861 } ;
5962
60- // Add custom data for bluesky post ID if present
63+ // Add media:content and optional bluesky post ID
64+ let customData = `<media:content url="${ imageUrl } " type="${ imageType } " medium="image" />` ;
6165 if ( post . data . blueskyPostId ) {
62- item . customData = `<bluesky:postId>${ post . data . blueskyPostId } </bluesky:postId>` ;
66+ customData + = `<bluesky:postId>${ post . data . blueskyPostId } </bluesky:postId>` ;
6367 }
68+ item . customData = customData ;
6469
6570 return item ;
6671 } ) ,
6772 xmlns : {
6873 bluesky : 'https://bsky.app/ns' ,
74+ media : 'http://search.yahoo.com/mrss/' ,
6975 } ,
7076 customData : `<language>en-us</language>` ,
7177 } ) ;
You can’t perform that action at this time.
0 commit comments