Giter Site home page Giter Site logo

hexo-filter-github-emojis's Introduction

hexo-filter-github-emojis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hexo-filter-github-emojis's Issues

显示问题

想问下为什么通过 :sparkles: 使用,会直接显示✨,但按照 README 里的说法,不是应该渲染成 <span>xxx</span> 来显示吗,直接显示导致不同设备显示效果不同

如果用 {% github_emoji :sparkles: %} 使用会出现背景显示问题
image

是我的使用有问题吗

插件将所有文本全部转换成了html实体编码。plugin transfers all text to HTML entity coding.

问题描述

插件将所有的文本全部转换为了html实体编码。不影响页面查看,但是影响hexo里的本地搜索功能。

问题复现

我的博客上左侧导航栏点搜索,搜"&#"就会发现很多文本搜不到,取而代之的是html实体编码。(也就是说当你真的要搜索关键词的时候,只会有一小部分出现,因为其他的都被转换成html实体编码了)
另一种复现的方式是右键,查看源代码(不是检查/审查元素),拖到下面就会发现没有实际的文本,只有html实体编码。

期望

希望只将::内的emoji转换为html实体编码从而实现emoji表情功能,而不是所有文本。

补充

我不是做前端的,js看的有些一知半解,大概知道是将文本转换成html实体编码,这样emoji也是实体编码便可以使用emoji来替换这部分内容。
如果我有空就直接看看怎么改了,不过最近有些忙,麻烦大佬了。
最后十分感激大佬为hexo开源做贡献!

Problem description

Plugin transfers all the text to html entity encoding. It looks all the same, perfectly good, but it would disturb hexo's local search.

Problem recurring

Click the search button(the one with a magnifier) in the left navigator on my blog, type "&#". You shall see tons of html entity coding rather than the keywords. (That is to say, when you type what u really want to search, a few of them would appear because the others were display in html entity coding.)
another method to recurrent the problem is to right click somewhere in the page and click show source code.(rather than Inspect element),scroll to the middle of the source code page, you will find the text represents in the html coding.

Expectation

Hope the transfer work will only effects on the emojis codes that are surround with ::, rather than all the word in the article.

One more thing

I am not a front-end coder, javascript sometimes confuses me, so I got the idea that the plugin transform the text to html entity coding thus making emojis visible.
If only I had the time for debugging... But I am busy working on my graduate paper.
Anyway, Thank you for your contribution for opensource on hexo platform.

Failed to install github emojis

Hello i am installing github emojis encountered an error, hinted as follows:
`- [email protected]

Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules \ chokidar \ node_modules \ fsevents):
Npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os": "darwin", "arch": "any"} (current: {"os": "win32", "arch" "X64"})
How can i solve this problem?

this plugin overwrites the directory of img

When I installed the plugin and enabled it, all of my photos' directories are been transfered into the directory under the main site.
here is an example:
Markdown source:

![Img](article_name/some_img.png)

it runs well cause all my photos have been stored in the related article_name folder。
render into HTML:

https://my_site/article_name/some_img.png

But after intalled the hexo-filter-github-emojis. My HTML represents this:

https://my_site/some_img.png

it fails to get the resources.

I don't know how to manage this. orz

Some links of emoji have expired

When I use emojis, e.g. :heart:, I get a 404. Thie link base https://github.githubassets.com/ is ok, but base https://assets-cdn.github.com/ is wrong. Have considered replacing the link address?

安装完成 hexo-filter-github-emojis 后执行 hexo clean报错

hexo-filter-github-emojis为今天下载的版本,错误如下:

/usr/local/hexo/node_modules/hexo-filter-github-emojis/index.js:21
)
^

SyntaxError: Unexpected token )
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at fs.readFile.then.script (/usr/local/hexo/node_modules/hexo/lib/hexo/index.js:238:19)
at tryCatcher (/usr/local/hexo/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:432:57)
at Promise._settlePromiseFromHandler (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:524:17)
at Promise._settlePromise (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/local/hexo/node_modules/bluebird/js/release/promise.js:638:18)
at /usr/local/hexo/node_modules/bluebird/js/release/nodeback.js:42:21
at /usr/local/hexo/node_modules/graceful-fs/graceful-fs.js:90:16
at tryToString (fs.js:457:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:444:12)
INFO Deleted database.

About the Hexo's "null"

Thank you for fix the warning on the last issue I created, now it fixed. but when I install the new emojis script, I always shows the "null" after the hexo's output on the terminal.
hexo cle

INFO  Deleted database.
INFO  Deleted public folder.
null

hexo g

INFO  Start processing
INFO  Files loaded in 7.92 s
null

hexo s

INFO  Start processing
INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
null

And after uninstall hexo-filter-github-emojis, the "null" disappear.

Customize the emoji size

because it looks small on the page, I want to make it bigger. but I can only modify the index.js file, can you add the variables to the config for customize the emojis' size?

Warning after install this script

After install the emoji script with npm, the warning comes out when use hexo generate and hexo server:

DeprecationWarning: Calling an asynchronous function without callback is deprecated.

About the Emoji's Style

When I used the github-emojis, I found that the images were shown unnaturally like follows:
image
and I set the unicode "true" and it works:

unicode: true

but now I try to use the local-emoji, and it always like follows:
image
I don't know how to hide the emojis' words, and I use the hexo blog with next theme.
Any help is welcome.

Bug: additional capital of the emoji

After install this plugin, and input :sparkles: in my blog. There will be capital with emoji like following image:

image

My configurations:

githubEmojis:
  enable: true
  className: github-emoji
  unicode: false
  styles:
    display: inline
    vertical-align: bottom
  localEmojis:

no support win10

hi! I want use your plugin but I can't.because the plugin error by os

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Script data shown in short abstracts

So I made a short test post and noticed that the script that you inject is being shown in the abstract of the post. Is there a quick fix for this on my end?

screenshot_20181206_203148

在表格中无法显示

原来是这样:

| :clock9: `:clock9:` |

应该显示为:

| 🕘 :clock9: |

但它只显示:

| :clock9: `:clock9:` |

该怎么办?

The escape code becomes `<img>`

Hello, I encountered a problem.
I would like to direct escape codes : tada:,
but the last rendered code is
<img class="github-emoji" title="tada" alt="tada" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f389.png?v7" height="20" width="20" />,
I do not want such an effect, what should I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.