Skip to content

Commit d5d2483

Browse files
committed
consolidate and add hashnode
1 parent 773b426 commit d5d2483

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎backend/firebase/functions/src/hashnode/scheduledNotionToHashNode.ts‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,24 @@ export const hashnodeToNotionPubSub = functions.pubsub
106106
});
107107

108108
console.log('Block Result', post);
109-
110109
if (post && post?.content) {
110+
if (page?.properties?.spotify?.url) {
111+
post.content = `
112+
%[${page.properties.spotify.url}]
113+
114+
${post.content}`;
115+
}
116+
if (page?.properties?.youtube?.url) {
117+
post.content = `
118+
%[${page.properties.youtube.url}]
119+
120+
${post.content}`;
121+
}
122+
post.content = `
123+
Original: https://codingcat.dev/${page._type}/${page.slug}
124+
125+
${post.content}
126+
`;
111127
input = {
112128
title: page.title,
113129
subtitle: page.excerpt,

0 commit comments

Comments
 (0)