1.0.5 • Published 4 years ago

eleventy-plugin-wordcount v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Eleventy

A collection of eleventy plugins

WordCount

This plugin creates a filter that takes a string, like 11ty content, then strips HTML tags, trims the lines and returns the word count.

  1. Install the NPM package in eleventy folder
npm install -S eleventy-plugin-wordcount
  1. Create or modify your .eleventy.js and add the plugin
const { wordCount } = require("eleventy-plugin-wordcount");

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(wordCount);
};
  1. Use the plugin filter in your liquid templates
<strong>Contains {{ content | wordCount }} words</strong>
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago