This repository has been archived on 2025-03-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coryd.dev-eleventy/src/_data/webmentions.js
2023-12-21 13:31:57 -08:00

14 lines
409 B
JavaScript

import EleventyFetch from '@11ty/eleventy-fetch'
export default async function () {
const KEY_CORYD = process.env.API_KEY_WEBMENTIONS_CORYD_DEV
const url = `https://webmention.io/api/mentions.jf2?token=${KEY_CORYD}&per-page=1000`
const res = EleventyFetch(url, {
duration: '1h',
type: 'json',
}).catch()
const webmentions = await res
return {
mentions: webmentions['children'],
}
}