chore: update uses
This commit is contained in:
parent
b38824a0d6
commit
a496b8aabb
6 changed files with 1 additions and 60 deletions
|
@ -1,28 +0,0 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const MATTER_TOKEN = process.env.ACCESS_TOKEN_MATTER
|
||||
const headers = { Cookie: MATTER_TOKEN }
|
||||
const url = `https://web.getmatter.com/api/library_items/favorites_feed`
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
fetchOptions: { headers },
|
||||
})
|
||||
const feed = await res
|
||||
const articles = feed.feed
|
||||
return articles.reverse().map((article) => {
|
||||
const tags = article['content']['tags'].map((tag) => tag['name'])
|
||||
return {
|
||||
url: article['content']['url'],
|
||||
title: article['content']['title'],
|
||||
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,
|
||||
id: btoa(article['id']),
|
||||
}
|
||||
})
|
||||
}
|
|
@ -3,7 +3,6 @@ module.exports = async function () {
|
|||
const feed = new ActivityFeed()
|
||||
feed.addSource('rss', '📝', 'https://coryd.dev/feeds/posts')
|
||||
feed.addSource('rss', '🎥', 'https://coryd.dev/feeds/movies')
|
||||
feed.addSource('rss', '📰', 'https://coryd.dev/feeds/articles')
|
||||
feed.addSource('rss', '📖', 'https://coryd.dev/feeds/books')
|
||||
const entries = feed.getEntries().catch()
|
||||
const res = await entries
|
||||
|
|
Reference in a new issue