Skip to content

Commit 2f12b61

Browse files
authored
fix(syndication): update Hashnode coverImage input to string URL (#714)
* feat(syndication): add syndicate-post workflow and dispatch runner (#708) * fix(syndication): update Hashnode tag shape to PublishPostTagInput (#710) * fix(syndication): update Hashnode coverImage input to string URL (#713)
1 parent 2dc2b6c commit 2f12b61

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎apps/sanity/functions/syndicate-content/index.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,7 @@ export const handler = documentEventHandler<ContentDocument>(
335335
publicationId,
336336
slug: `${data._type}-${slug}`,
337337
tags: hashnodeTags,
338-
coverImageOptions: {
339-
coverImageURL: hashnodeCoverImageUrl,
340-
},
338+
...(hashnodeCoverImageUrl ? { coverImage: hashnodeCoverImageUrl } : {}),
341339
originalArticleURL: canonicalUrl,
342340
contentMarkdown: `Original: ${canonicalUrl}\n\n${youtubeEmbed}${contentMarkdown}`,
343341
};

‎scripts/run-syndicate-post.mjs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ async function run() {
190190
publicationId,
191191
slug: `${doc._type}-${slug}`,
192192
tags: hashnodeTags,
193-
coverImageOptions: {
194-
coverImageURL: hashnodeCoverImageUrl,
195-
},
193+
...(hashnodeCoverImageUrl ? { coverImage: hashnodeCoverImageUrl } : {}),
196194
originalArticleURL: canonicalUrl,
197195
contentMarkdown: `Original: ${canonicalUrl}\n\n${youtubeEmbed}${contentMarkdown}`,
198196
};

0 commit comments

Comments
 (0)