chore: ads post
This commit is contained in:
parent
4f8f032a25
commit
98ad50f265
4 changed files with 57 additions and 6 deletions
|
@ -15,9 +15,9 @@ module.exports = {
|
|||
mdToHtml: (content) => {
|
||||
return marked.parse(content)
|
||||
},
|
||||
getFirstAttachment: (post) => {
|
||||
if (post && post['attachments'] && post['attachments'].length > 0) {
|
||||
return post['attachments'][0].url ? post['attachments'][0].url : post['attachments'][0]
|
||||
getPostImage: (post) => {
|
||||
if (post && post['image'] && post['image'] !== '') {
|
||||
return post['image']
|
||||
}
|
||||
|
||||
return '/assets/img/social-card.png'
|
||||
|
|
Reference in a new issue