emoji-for-jekyll

A plugin for Jekyll that seamlessly enable emoji.
授权协议 MIT License
开发语言 JavaScript
所属分类 程序开发、 Emoji 表情相关
软件类型 开源软件
地区 不详
投 递 者 戚逸清
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Emoji for Jekyll

Seamlessly enable emoji for Jekyll.

Installation

  1. Install the emoji_for_jekyll gem:

     gem install emoji_for_jekyll
    
  2. Add emoji_for_jekyll to the list of gems in config.yml:

gems: ["emoji_for_jekyll"]
  1. See beautiful emoji!

or

  1. Copy emoji_for_jekll.rb and emoji.json into the _plugins directory

GitHub Pages

This plugin (and as a matter of fact, most Jekyll plugins) do not work with GitHub Pages as GitHub(understandably) do not allow arbitrary code to be executed on their servers. As a result, onlyselected plugins workwith GitHub pages.

Here are my suggestions if you are using GitHub Pages:

  1. Build your site locally and push the content of _site.

  2. Use Jemoji.

Options

Whitelist and blacklist

You can also whitelist or blacklist certain emojis. On the posts or pages that you want to whitelist or blacklist certain emojis, add emoji-whitelist or emoji-blacklist follow by a list of emojis without the colons to the front matter. For example:

emoji-whitelist:
  - bowtie
  - blush

or

emoji-blacklist:
  - smile

When both emoji-whitelist and emoji-blacklist are declared, the effect will be the same as when only the whitelist is declared.

Disabling

You may choose to disable this plugin for certain posts or pages by adding emoji: false to the front matter of these posts and pages.

If, for some reason, you want to disable this plugin for the entire site, you can either remove emoji-for-jekyll.rb from _plugins, or just add emoji: false to _config.yml.

Emojify front-matter items

If you need to emojify certain items in your front-matter, like title or caption that is needed for some templates, you can do so by setting emoji-additional-keys in _config.yml. This setting is optional and expects an array:

emoji-additional-keys: ["title", "caption"]

Custom images

By default the images are sourced from GitHub CDN but should you want to use other images you can by choosing a directory with the setting emoji-images-path in _config.yml. For example: emoji-images-path: 'img/emoji'

Images copied into this directory will be added the whitelist. E.g.: custom.png would whitelist :custom:. Any images with the same name as the emoji list will overwrite the default GitHub emoji image.

Updating Emoji for Jekyll

Updating Emoji for Jekyll is very easy:

gem update emoji_for_jekyll
 相关资料
  • Emoji 是一个用来快速访问各种表情图片的类,类包含静态方法可直接返回表情的字符串。

  • js-emoji 可以让你在浏览器上显示 Emoji 表情,使用方法: <link href="emoji.css" rel="stylesheet" type="text/css" /><script src="emoji.js" type="text/javascript"></script><script type="text/javascript">// replaces \u{1F604

  • Emoji-Picker 可以让你在网站上的输入编辑框中加入一个 emoji 表情选择器。

  • 《Emoji表情编解码库XXL-EMOJI》 方便维护,该项目合并至: https://gitee.com/xuxueli0323/xxl-tool

  • Emoji Keyboard 提供了带苹果所有表情的输入键盘控件。

  • emoji-regex emoji-regex offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on emoji-test-regex-pa