@chrisburnell/eleventy-cache-webmentions 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -77,7 +77,7 @@ module.exports = (eleventyConfig, options = {}) => {
|
|
|
77
77
|
// If there is a cached file but it is outside of expiry, fetch fresh
|
|
78
78
|
// results since the most recent
|
|
79
79
|
if (!asset.isCacheValid(options.duration)) {
|
|
80
|
-
const since =
|
|
80
|
+
const since = webmentions.children.length ? webmentions.children[0].published || webmentions.children[0]["wm-received"] : false
|
|
81
81
|
const url = `https://webmention.io/api/mentions.jf2?domain=${hostname(options.domain)}&token=${TOKEN}&per-page=9001${since ? `&since=${since}` : ``}`
|
|
82
82
|
await fetch(url)
|
|
83
83
|
.then(async (response) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrisburnell/eleventy-cache-webmentions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Cache webmentions from webmention.io using eleventy-cache-assets.",
|
|
5
5
|
"main": "eleventy-cache-webmentions.js",
|
|
6
6
|
"author": "Chris Burnell <me@chrisburnell.com>",
|