Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Add page image support
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanDalelR committed May 31, 2023
1 parent 55edc5e commit 4aa6008
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pages/api/actions/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,13 @@ export default async (req, res) => {
if (notionValue?.length) {
for (let index = 0; index < notionValue.length; index++) {
const element = notionValue[index];
textToWrite += `\n - [${element.title} - ${element.url}](${element.url})`;
textToWrite += `\n - [${
element?.icon.type === "external"
? `![Page icon](${element?.icon.external.url} "Page icon")`
: element?.icon.type === "emoji"
? `![Page icon](${element?.icon.emoji} "Page icon")`
: ""
} ${element.properties.title.plain_text}](${element.url})`;
textToWrite += `\n`;
}
} else {
Expand Down

1 comment on commit 4aa6008

@vercel
Copy link

@vercel vercel bot commented on 4aa6008 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.