@chrisburnell/eleventy-cache-webmentions 0.0.3 → 0.1.0

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.
@@ -54,6 +54,7 @@ module.exports = (config, options = {}) => {
54
54
  },
55
55
  urlReplacements: {},
56
56
  maximumHtmlLength: 2000,
57
+ maximumHtmlText: "mentioned this in",
57
58
  },
58
59
  options
59
60
  )
@@ -146,7 +147,7 @@ module.exports = (config, options = {}) => {
146
147
  }
147
148
  const { html, text } = entry.content
148
149
  if (html && html.length > options.maximumHtmlLength) {
149
- entry.content.value = `mentioned this in <a href="${entry["wm-source"]}">${entry["wm-source"]}</a>`
150
+ entry.content.value = `${options.maximumHtmlText} <a href="${entry["wm-source"]}">${entry["wm-source"]}</a>`
150
151
  } else {
151
152
  entry.content.value = sanitizeHTML(html || text, options.allowedHTML)
152
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrisburnell/eleventy-cache-webmentions",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
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>",