Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburnell committed Dec 5, 2021
1 parent fdd0164 commit e349ec9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion eleventy-cache-webmentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module.exports = (config, options = {}) => {
},
urlReplacements: {},
maximumHtmlLength: 2000,
maximumHtmlText: "mentioned this in",
},
options
)
Expand Down Expand Up @@ -146,7 +147,7 @@ module.exports = (config, options = {}) => {
}
const { html, text } = entry.content
if (html && html.length > options.maximumHtmlLength) {
entry.content.value = `mentioned this in <a href="${entry["wm-source"]}">${entry["wm-source"]}</a>`
entry.content.value = `${options.maximumHtmlText} <a href="${entry["wm-source"]}">${entry["wm-source"]}</a>`
} else {
entry.content.value = sanitizeHTML(html || text, options.allowedHTML)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chrisburnell/eleventy-cache-webmentions",
"version": "0.0.3",
"version": "0.1.0",
"description": "Cache webmentions from webmention.io using eleventy-cache-assets.",
"main": "eleventy-cache-webmentions.js",
"author": "Chris Burnell <me@chrisburnell.com>",
Expand Down

0 comments on commit e349ec9

Please sign in to comment.