Fetch Webmentions
This commit is contained in:
parent
f46436578a
commit
30350030aa
4 changed files with 56 additions and 11 deletions
13
src/_data/webmentions.js
Normal file
13
src/_data/webmentions.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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, {
|
||||
duration: "1s",
|
||||
type: "json",
|
||||
});
|
||||
console.log('mentions:', mentions);
|
||||
console.log('mentions.children:', mentions.children);
|
||||
return mentions.children;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue