eleventy-plugin-emojify

1.0.1 • Public • Published

eleventy-plugin-emojify

This plugin for 11ty adds an emojify filter to your templates, allowing you to use emoji markup inside them. It is inspired by the same filter found in Hugo.

Its only dependency is emojibase-data from Emojibase to serve as its data source.

Installation

npm install --save eleventy-plugin-emojify

In your .eleventy.js file, add the plugin:

// .eleventy.js
const emojifyPlugin = require('eleventy-plugin-emojify');

module.exports = function (eleventyConfig) {
    eleventyConfig.addPlugin(emojifyPlugin);
}

Usage

Simply add the emojify filter to any content, like so: {{ content | emojify | safe }}

This will transform this:

**Made with :heart:, some :robot: and Eleventy!**

To this:

<strong>Made with ❤️, some 🤖 and Eleventy!<strong>

The supported shortcode list is based on Emojibase shortcode curated list and might differ from platform to platform.

Package Sidebar

Install

npm i eleventy-plugin-emojify

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

2.79 kB

Total Files

3

Last publish

Collaborators

  • fbnlsr