Display webmentions
This commit is contained in:
parent
30350030aa
commit
91326c03fc
11 changed files with 314 additions and 15 deletions
14
src/_data/metadata.json
Normal file
14
src/_data/metadata.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue