-
Notifications
You must be signed in to change notification settings - Fork 55
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
Ghost post JSON changed breaking comment publish #17
Comments
reply structure sent starting from Ghost v0.5.x
Integration with Ghost is a really cool feature. It looks great, helps jump-start the forum, you avoid shipping users' data to Disqus. Are there any plans to fix it? Is it on a backburner until Ghost's API stabilizes? |
Why is the ghost api being used at all? Just to get the title and markdown of the post? |
What I am trying to say is that the script could fallback to a non-API-dependent version while Ghost doesnt provide public access to some API calls. |
the ghost fix we are waiting is TryGhost/Ghost#4181 right? while it doesnt happen here is the super-ugly workaround I am using on embej.js (I've basically removed the ajax call): |
@fczuardi, you are right, the Ghost API is used to get the Title and Markdown of the post (and in the future things like tags and such). The title can be obtained by going through the DOM, but unfortunately the article text wouldn't be that usable due to the lack of markdown tags for formatting. The idea of falling back to that until TryGhost/Ghost#4181 is indeed a good one. Also, an alternative to your workaround is to modify the routes exposed by Ghost and make them public as well as this plugin to use the new routes. See this post for my implementation. |
yes @fuzzmz, patching the plugin + patching ghost is a workaround that gives better results (we get the markdown), but has the drawback of having to touch 2 projects (if you dont count changing the ghost template a patch in itself), which means remembering to re-patch if any of the two changes… nothing wrong with that, but for me just the title and link is a compromise I can live with until the bug gets fixed :) |
I've just released v0.3.0 of this plugin:
Sorry for the super delay, I haven't had much chance outside of NodeBB development to dedicate to this plugin until now |
The JSON reply to
/ghost/api/v0.1/posts/:id
has changed between v0.4.x and v0.5.x.The new reply is
{posts: [result.toJSON()]}
versus the old one which just returnedresult.toJSON()
. This means that the code for parsing the reply (line 154 in /public/lib/embed.js) won't work correctly.Also note that the actual content returned by the API call has changed, but nothing that breaks the comments plugin (at least so far).
The text was updated successfully, but these errors were encountered: