summaryrefslogtreecommitdiff
path: root/.eleventy.js
diff options
context:
space:
mode:
Diffstat (limited to '.eleventy.js')
-rw-r--r--.eleventy.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/.eleventy.js b/.eleventy.js
index 2ffec7d..6cb78a0 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -5,7 +5,11 @@ const { DateTime } = require("luxon");
const utils = require("markdown-it/lib/common/utils");
const excerptMinimumLength = 280;
-const excerptSeparator = "<!--more-->"
+const excerptSeparator = "<!--more-->";
+
+const twemojiOpts = {
+ base: "https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.1.0/",
+};
function extractExcerpt(doc) {
if (doc.data.readOnline) return "[[ No Excerpt Available ]]";
@@ -66,7 +70,7 @@ module.exports = (cfg) => {
md.renderer.rules.emoji = (token, i) =>
`<span class="emoji-container emoji_${token[i].markup}" ` +
- `title="${token[i].markup}">${twemoji.parse(token[i].content)}</span>`;
+ `title="${token[i].markup}">${twemoji.parse(token[i].content, twemojiOpts)}</span>`;
md.renderer.rules.code_block = (tokens, i, options, env, slf) =>
`<pre${slf.renderAttrs(tokens[i])}><code>` +
utils.escapeHtml(tokens[i].content.replace(/ /g, "\xA0"))+'</code></pre>\n';