File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { getCollection } from 'astro:content';
33import type { APIContext } from 'astro' ;
44import sanitizeHtml from 'sanitize-html' ;
55import MarkdownIt from 'markdown-it' ;
6+ import { getPostImage } from '../lib/posts' ;
67
78const parser = new MarkdownIt ( ) ;
89
@@ -49,13 +50,12 @@ export async function GET(context: APIContext) {
4950 } ) ,
5051 } ;
5152
52- if ( post . data . image ) {
53- item . enclosure = {
54- url : `${ site } ${ post . data . image . src } ` ,
55- type : getMimeType ( post . data . image . src ) ,
56- length : 0 ,
57- } ;
58- }
53+ const image = getPostImage ( post ) ;
54+ item . enclosure = {
55+ url : `${ site } ${ image . src } ` ,
56+ type : getMimeType ( image . src ) ,
57+ length : 0 ,
58+ } ;
5959
6060 // Add custom data for bluesky post ID if present
6161 if ( post . data . blueskyPostId ) {
You can’t perform that action at this time.
0 commit comments