const { howlongtobeat, webmention } = require('jam-my-stack'); const fsp = require('fs').promises; (async function() { console.log("1. adding Howlongtobeat info...") await howlongtobeat.howlong(`${__dirname}/content/articles`) // 4. get webmentions console.log("2. Fetching webmentions...") const mentions = await webmention.getWebmentions("jefklakscodex.com") const json = JSON.stringify(mentions, null, 4) await fsp.writeFile(`${__dirname}/data/webmentions.json`, json, 'utf-8') // 5. send webmentions console.log("3. Sending webmentions...") await webmention.send("jefklakscodex.com", `${__dirname}/data/webmentions-since.json`) console.log("-- all done!") })()