chore: drop webmentions
This commit is contained in:
parent
6a8fa53478
commit
fdcdb2e0ce
11 changed files with 2 additions and 272 deletions
|
@ -1,20 +0,0 @@
|
|||
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`
|
||||
if (process.env.ELEVENTY_PRODUCTION) {
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
}).catch()
|
||||
const webmentions = await res
|
||||
return {
|
||||
mentions: webmentions['children'],
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
mentions: []
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue