scripts(email_issue): add links in author - #82
Conversation
| const authorsWithWebsite = authors.map((author, index) => { | ||
| const isLastElement = index === authors.length - 1; | ||
| console.log(isLastElement); | ||
| return `[${author.Name}](${author.Website})` + (isLastElement ? '' : `, `); |
There was a problem hiding this comment.
It can just be this -
| return `[${author.Name}](${author.Website})` + (isLastElement ? '' : `, `); | |
| return `[${author.Name}](${author.Website})`; |
| return `[${author.Name}](${author.Website})` + (isLastElement ? '' : `, `); | ||
| }); | ||
|
|
||
| return `*by ${authorsWithWebsite}*`; |
There was a problem hiding this comment.
And then joining like this should do the job I believe
| return `*by ${authorsWithWebsite}*`; | |
| return `*by ${authorsWithWebsite.join(',')}*`; |
There was a problem hiding this comment.
The VS Code Markdown Preview was confusing me as it was showing me two commas, but in reality, there was only one. 😏
|
@prateek3255 review this as well if you have time, have resolved all review comments |
fe0283c to
be3ea82
Compare
|
|
||
| # This week in GIF | ||
|
|
||
| [${currentIssue.gif.caption}](${process.env.SITE_URL}issues/${options.issueNumber}?section=gif) |
There was a problem hiding this comment.
@gupta-ji6 Why did we remove the gif image and replaced with Link?
There was a problem hiding this comment.
in #69, we replaced all the gifs media with videos & videos weren't supported to be sent in Buttondown if I remember correctly.
There was a problem hiding this comment.
Oh yeah, can't do video in emails. I guess we would need to still figure out a way to keep two versions, video for the web and gif for the email, because just adding a link doesn't look good. Although this can be done in a separate PR, so let's bring this in for now
Description
TODO