Display webmentions

This commit is contained in:
Devon Campbell 2024-06-20 14:25:29 -04:00
commit 91326c03fc
11 changed files with 314 additions and 15 deletions

14
src/_data/metadata.json Normal file
View file

@ -0,0 +1,14 @@
{
"title": "devon.lol",
"description": "I write essays to no one about video games, technology, the internet, and other things in the world.",
"language": "en-us",
"url": "https://devon.lol/",
"author": {
"name": "Devon Campbell",
"email": "devon@devon.lol",
"mastodon": {
"username": "RadDevon",
"instance": "techhub.social"
}
}
}

View file

@ -3,11 +3,10 @@ const EleventyFetch = require("@11ty/eleventy-fetch");
module.exports = async function fetchMentions() {
const url = `https://webmention.io/api/mentions.jf2?domain=devon.lol&token=${process.env.WEBMENTIONSIO_TOKEN}`;
const mentions = await EleventyFetch(url, {
const mentionsResponse = await EleventyFetch(url, {
duration: "1s",
type: "json",
});
console.log('mentions:', mentions);
console.log('mentions.children:', mentions.children);
return mentions.children;
const mentions = mentionsResponse.children;
return mentions;
};