This commit is contained in:
Cory Dransfeldt 2023-03-12 13:16:24 -07:00
parent 82604bd42b
commit 0ff72b4770
No known key found for this signature in database
11 changed files with 193 additions and 2 deletions

17
src/_data/now.js Normal file
View file

@ -0,0 +1,17 @@
const EleventyFetch = require('@11ty/eleventy-fetch')
module.exports = async function () {
const url = 'https://coryd.dev/api/now?endpoints=artists,albums,books,movies,tv'
const res = EleventyFetch(url, {
duration: '3h',
type: 'json',
})
const now = await res
return {
artists: now.artists,
albums: now.albums,
books: now.books,
movies: now.movies,
tv: now.tv,
}
}