feat: add tags to shared content

This commit is contained in:
Cory Dransfeldt 2023-09-08 12:42:44 -07:00
parent 64e434c6b9
commit 7216b848f4
No known key found for this signature in database
8 changed files with 84 additions and 10 deletions

View file

@ -13,10 +13,6 @@ module.exports = async function () {
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'],
@ -24,9 +20,8 @@ module.exports = async function () {
? new Date(article['content']['library']['modified_date'])
: new Date(article['content']['publication_date']),
description: article['content']['excerpt'],
notes: article['content']['my_notes'],
notes: article['content']['my_notes'] || '',
tags,
shareTags,
id: btoa(article['id']),
}
})