chore: feed updates
This commit is contained in:
parent
70caf3eb21
commit
d76c9f7351
5 changed files with 29 additions and 6 deletions
|
@ -12,14 +12,21 @@ module.exports = async function () {
|
|||
const feed = await res
|
||||
const articles = feed.feed
|
||||
return articles.reverse().map((article) => {
|
||||
const tags = article['content']['tags'].map((tag) => tag['name'])
|
||||
const shareTags = tags
|
||||
.map((tag) => `#${tag}`)
|
||||
.join(' ')
|
||||
.trim()
|
||||
return {
|
||||
url: article['content']['url'],
|
||||
title: article['content']['title'],
|
||||
date: article['content']['publication_date']
|
||||
? new Date(article['content']['publication_date'])
|
||||
: new Date(article['content']['feed_date']),
|
||||
summary: article['content']['excerpt'],
|
||||
date: article['content']['library']['modified_date']
|
||||
? new Date(article['content']['library']['modified_date'])
|
||||
: new Date(article['content']['publication_date']),
|
||||
description: article['content']['excerpt'],
|
||||
notes: article['content']['my_notes'],
|
||||
tags,
|
||||
shareTags,
|
||||
id: btoa(article['id']),
|
||||
}
|
||||
})
|
||||
|
|
Reference in a new issue