Closed s10wen closed 9 years ago
@s10wen Hexo version?
hexo-cli: 0.1.4
os: Darwin 14.3.0 darwin x64
http_parser: 1.0
node: 0.10.24
v8: 3.14.5.9
ares: 1.9.0-DEV
uv: 0.10.21
zlib: 1.2.3
modules: 11
openssl: 1.0.1e
I have the same error. When I type"hexo version",I get the following:
hexo: 3.0.1
os: Windows_NT 6.1.7601 win32 ia32
http_parser: 2.3
node: 0.12.2
v8: 3.28.73
uv: 1.4.2-node1
zlib: 1.2.8
modules: 14
openssl: 1.0.1m
After a few attempts, I finally figured it out.
In hexo of new version hexo.util
is removed, and the hexo-util package is required. So I think adding the dependency of hexo-util is the answer.
Thanks @Gtskk but no luck for me (unless I'm missing a step?)
I installed the dependancy:
npm install hexo-util --save
Then hexo emoji again:
npm install hexo-tag-emojis --save
Then added some test code to a blog post:
{% emoji heart 32 custom_class1,custom_class2 %}
And updated the _config.yml
(trying both the root or theme not sure if this matters?):
plugins:
- hexo-tag-emojis
But after starting the server I get:
༼ つ ◕_◕ ༽つ⚡ hexo server
ERROR Plugin load failed: hexo-tag-emojis
TypeError: Cannot read property 'html_tag' of undefined
at /Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo-tag-emojis/index.js:1:89
at /Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/lib/hexo/index.js:229:12
at tryCatcher (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Promise._settlePromiseFromHandler (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:454:31)
at Promise._settlePromiseAt (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:530:18)
at Promise._settlePromises (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:175:16)
at Async._drainQueues (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:185:10)
at Async.drainQueues (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at process._tickCallback (node.js:415:13)
I'll be working on a new version for Hexo v3, this plugin is for Hexo v2. I'll keep you updated!
@sergiolepore ace, thanks, I'll look out for updates and test when available.
@sergiolepore any movement on this please? or anything I can do to help, or can you point me in the right direction? Cheers.
The following steps may help:
npm install hexo-util --save
var htmlTag = require('hexo-util').htmlTag,
in node_modules/hexo-tag-emojis/index.js
fileThen it will be ok. I have also issued a pull request.
@Gtskk thanks, I tried this but get Template render error: unknown block tag: emoji
.
Here's the full log if it helps:
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: unknown block tag: emoji
at Error.exports.TemplateError (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/lib.js:51:19)
at Object.extend.fail (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/parser.js:64:15)
at Object.extend.parseStatement (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/parser.js:544:18)
at Object.extend.parseNodes (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/parser.js:1151:30)
at Object.extend.parseAsRoot (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/parser.js:1177:42)
at Object.module.exports.parse (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/parser.js:1199:18)
at Object.module.exports.compile (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/compiler.js:1118:48)
at Obj.extend._compile (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/environment.js:444:35)
at Obj.extend.compile (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/environment.js:433:18)
at null.<anonymous> (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/environment.js:378:22)
at Object.exports.withPrettyErrors (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/lib.js:24:16)
at Obj.extend.render (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/environment.js:374:20)
at Obj.extend.renderString (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/nunjucks/src/environment.js:261:21)
at /Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/lib/extend/tag.js:56:9
at tryCatcher (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Promise._resolveFromResolver (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:427:31)
at new Promise (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:53:37)
at Tag.render (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/lib/extend/tag.js:55:10)
at Object.tagFilter [as onRenderEnd] (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/lib/hexo/post.js:253:16)
at Promise.then.then.then.output (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/lib/hexo/render.js:55:19)
at tryCatcher (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Promise._settlePromiseFromHandler (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:454:31)
at Promise._settlePromiseAt (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:530:18)
at Promise._settlePromises (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:177:16)
at Async._drainQueues (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:187:10)
at Async.drainQueues (/Users/simonowen/GitHub/hexo/s10wen.github.io/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at process._tickCallback (node.js:415:13)
@s10wen I think you should have forgotten the steps:
First, open your _config.yml file and paste the following lines:
# hexo-tag-emojis plugin configuration
emojis:
image_dir: images/emojis
Then run this command:
hexo emojis install
Please check them.
I've got 2x _config.yml
files, one in the root, one in the theme.
I've tried adding that code and running hexo emojis install
but it doesn't run.
I've also tried using the cdn
option:
emojis:
cdn: http://cdn.staticfile.org/emojify.js/0.9.0/emojis
But still nothing :/
Add the following codes to _config.yml
file in the root.
plugins:
- hexo-tag-emojis
# hexo-tag-emojis plugin configuration
emojis:
image_dir: images/emojis
Then run hexo emojis install
.
@Gtskk, hi! Tell me, please, it will work with Hexo v 3.x?
@Gtskk I've got hexo-tag-emojis
there and updated line 1 and added the code to the root _config.yml
but where I run hexo emojis install
I just get Usage: hexo <command>
.
Here's my setup if that helps:
hexo: 3.1.1
os: Darwin 14.4.0 darwin x64
http_parser: 1.0
node: 0.10.24
v8: 3.14.5.9
ares: 1.9.0-DEV
uv: 0.10.21
zlib: 1.2.3
modules: 11
openssl: 1.0.1e
@s10wen What you have got means that hexo emojis install
didn't register successfully.
Now I think you can try one of the following steps:
Use the cnd instead of installing the assets
Or
Re-install the plugin and repeat the steps here
I've tried the cdn
option and also re-installing.
@Gtskk do you have your hexo
repo on here anywhere please? I'm thinking if I can get yours working locally that might help me to figure out what the issue is.
@s10wen You can just hexo init
a new project, just like creating a new hexo site. Then install the hexo-tag-emojis
plugin in the project directory.Finally repeat the steps here
You can check if the errors still occur.
Hey, @Gtskk you're right, I can confirm with a fresh hexo
build your solution works. So now I need to figure out what's breaking it in mine https://github.com/s10wen/s10wen.github.io
Thanks for the help!
Guess I should leave this issue open until the PR is accepted https://github.com/sergiolepore/hexo-tag-emojis/pull/10
Fixed with #10.
I'll push a new release later today. Thanks!
I ran
npm install hexo-tag-emojis --save
and in my_config.yml
have:Then ran
hexo emojis install
and I get:Any ideas please?