New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help fixing Facebook comments plugin #3256

Open
RichardJECooke opened this Issue Sep 8, 2018 · 3 comments

Comments

2 participants
@RichardJECooke

RichardJECooke commented Sep 8, 2018

Hi, I'm trying to get the Facebook comments plugin to work.

The original author abandoned the project three years ago. There is one bug that I don't understand Hexo well enough to fix.

Please will someone take a look and see if they can spot it?
Or direct me to some docs on how to write a plugin, or how to debug Hexo?

The issue is that the plugin helper isn't being registered

fbcommentshead is not defined
    at eval (eval at compile (/mnt/c/data/hexo/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:27:7)

I've forked the plugin, cleaned up the code and readme, and published it to npm.
The code is here: https://github.com/RichardJECooke/hexo-fbcomments/blob/master/index.js

@RichardJECooke

This comment has been minimized.

Show comment
Hide comment
@RichardJECooke

RichardJECooke Sep 8, 2018

Ok, fixed that error.

Now I get in my theme's post.ejs class that 'post' is not defined when using <%- fbcomments(post.permalink) %>

How do I fix that please?

RichardJECooke commented Sep 8, 2018

Ok, fixed that error.

Now I get in my theme's post.ejs class that 'post' is not defined when using <%- fbcomments(post.permalink) %>

How do I fix that please?

@RichardJECooke

This comment has been minimized.

Show comment
Hide comment
@RichardJECooke

RichardJECooke Sep 8, 2018

Ah, fixed that too, should be 'page', not 'post'. Yay, the Facebook comments plugin is working again. Will upload it to npm and change the url in the docs

RichardJECooke commented Sep 8, 2018

Ah, fixed that too, should be 'page', not 'post'. Yay, the Facebook comments plugin is working again. Will upload it to npm and change the url in the docs

@tomap

This comment has been minimized.

Show comment
Hide comment
@tomap

tomap Sep 8, 2018

Contributor

Sorry that no one came to help, but I guess we can close this issue

Contributor

tomap commented Sep 8, 2018

Sorry that no one came to help, but I guess we can close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment