@chrisburnell/eleventy-cache-webmentions 0.1.11 → 0.1.12
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.
- package/.prettierrc +4 -0
- package/eleventy-cache-webmentions.js +3 -3
- package/package.json +1 -1
package/.prettierrc
ADDED
|
@@ -104,7 +104,7 @@ module.exports = (eleventyConfig, options = {}) => {
|
|
|
104
104
|
const rawWebmentions = await fetchWebmentions()
|
|
105
105
|
let webmentions = {}
|
|
106
106
|
|
|
107
|
-
// Sort Webmentions into groups by target
|
|
107
|
+
// Sort Webmentions into groups by `wm-target`
|
|
108
108
|
rawWebmentions.children.forEach((webmention) => {
|
|
109
109
|
// Get the target of the Webmention and fix it up
|
|
110
110
|
let url = baseUrl(fixUrl(webmention["wm-target"].replace(/\/?$/, "/"), options.urlReplacements))
|
|
@@ -116,10 +116,10 @@ module.exports = (eleventyConfig, options = {}) => {
|
|
|
116
116
|
webmentions[url].push(webmention)
|
|
117
117
|
})
|
|
118
118
|
|
|
119
|
-
// Sort Webmentions in groups by url and remove duplicates by
|
|
119
|
+
// Sort Webmentions in groups by url and remove duplicates by `url`
|
|
120
120
|
for (let url in webmentions) {
|
|
121
121
|
webmentions[url] = uniqBy(webmentions[url], (item) => {
|
|
122
|
-
return item["
|
|
122
|
+
return item["url"]
|
|
123
123
|
})
|
|
124
124
|
}
|
|
125
125
|
|
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.12",
|
|
4
4
|
"description": "Cache webmentions from webmention.io using eleventy-fetch.",
|
|
5
5
|
"main": "eleventy-cache-webmentions.js",
|
|
6
6
|
"author": "Chris Burnell <me@chrisburnell.com>",
|