diff --git a/bun.lockb b/bun.lockb index 481ea8d7..94199456 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eleventy.config.js b/eleventy.config.js index f340f1b2..667e6f56 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -4,7 +4,7 @@ import pluginEleventyNavigation from "@11ty/eleventy-navigation"; import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import pluginEmbedEverything from "eleventy-plugin-embed-everything"; import pluginMetagen from "eleventy-plugin-metagen"; -import pluginEmojiReadTime from "@11tyrocks/eleventy-plugin-emoji-readtime"; +import pluginWordcount from "eleventy-plugin-wordcount-extended"; import pluginTOC from "@uncenter/eleventy-plugin-toc"; // Custom Configurations @@ -21,7 +21,7 @@ export default function(eleventyConfig) { eleventyConfig.addPlugin(pluginSyntaxHighlight, { preAttributes: { tabindex: 0 } }); eleventyConfig.addPlugin(pluginEmbedEverything, { add: ['soundcloud'] }); eleventyConfig.addPlugin(pluginMetagen); - eleventyConfig.addPlugin(pluginEmojiReadTime); + eleventyConfig.addPlugin(pluginWordcount); eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3', 'h4', 'h5', 'h6'], wrapper: function (toc) { diff --git a/package.json b/package.json index e3303bc2..1eb83fc3 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ "@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-plugin-rss": "^2.0.2", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", - "@11tyrocks/eleventy-plugin-emoji-readtime": "^1.0.1", "@uncenter/eleventy-plugin-toc": "^1.0.3", "@zachleat/details-utils": "^2.0.2", "eleventy-plugin-embed-everything": "^1.18.2", "eleventy-plugin-metagen": "^1.8.3", + "eleventy-plugin-wordcount-extended": "^0.2.1", "install": "^0.13.0", "markdown-it-anchor": "^9.0.1", "markdown-it-attribution": "^0.1.4", diff --git a/src/_includes/global/content.njk b/src/_includes/global/content.njk index 251315fd..4f686713 100644 --- a/src/_includes/global/content.njk +++ b/src/_includes/global/content.njk @@ -18,18 +18,17 @@ {% if isArticle %}

{{ desc }}

-

Posted on {{ date | formatDate }} by {{ sitemeta.siteAuthor.name }} - {% if updated %} - • Last updated on {{ updated | formatDate }}

- {% endif %} - {% if categories %} -

Categories: - {% for cat in categories %} - {{ cat }}{% if not loop.last %}, {% endif %} - {% endfor %} -

- {% endif %} -

{{ content | emojiReadTime }}

+

{{ content | wordcount }} words. Posted on {{ date | formatDate }} by {{ sitemeta.siteAuthor.name }}

+ {% if updated %} +

Last updated on {{ updated | formatDate }}

+ {% endif %} + {% if categories %} +

Categories: + {% for cat in categories %} + {{ cat }}{% if not loop.last %}, {% endif %} + {% endfor %} +

+ {% endif %}
{% else %} {% if desc %}