Skip to content

fbnlsr/eleventy-plugin-emojify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An emoji filter for Eleventy based on Emojibase that converts emoji markup to unicode emojis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published