@chrisburnell/eleventy-cache-webmentions 2.0.0 → 2.0.1
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/README.md +16 -0
- package/eleventy-cache-webmentions.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
> Cache webmentions using eleventy-fetch and make them available to use in collections, layouts, pages, etc. in Eleventy.
|
|
4
4
|
|
|
5
|
+
## Breaking change for v2.0.0
|
|
6
|
+
|
|
7
|
+
Version 2.0.0 introduces a breaking change for those migrating from earlier versions of the plugin. This affects usage of the plugin from JavaScript files; specifically, you will need to make a small change to the way that you `require()` the plugin by removing an extra set of parentheses:
|
|
8
|
+
|
|
9
|
+
**v1.2.5 and below**
|
|
10
|
+
|
|
11
|
+
```javascript
|
|
12
|
+
require("@chrisburnell/eleventy-cache-webmentions")()
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**v2.0.0 and above**
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
require("@chrisburnell/eleventy-cache-webmentions")
|
|
19
|
+
```
|
|
20
|
+
|
|
5
21
|
## Quick Guide
|
|
6
22
|
|
|
7
23
|
I wrote a quicker and simpler guide to getting this Eleventy plugin working that cuts out all the fluff and extra details.
|
|
@@ -42,7 +42,7 @@ const getPublished = (webmention) => {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const getContent = (webmention) => {
|
|
45
|
-
return webmention?.["content"]?.["html"] || webmention?.["content"] || webmention?.["data"]?.["content"] || ""
|
|
45
|
+
return webmention?.["contentSanitized"] || webmention?.["content"]?.["html"] || webmention?.["content"]?.["value"] || webmention?.["content"] || webmention?.["data"]?.["content"] || ""
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const getSource = (webmention) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrisburnell/eleventy-cache-webmentions",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Cache webmentions using eleventy-fetch and make them available to use in collections, layouts, pages, etc. in Eleventy.",
|
|
5
5
|
"author": "Chris Burnell <me@chrisburnell.com>",
|
|
6
6
|
"license": "MIT",
|