manton
manton

We announced Conversation.js this week and focused on how easy it is to enable on Micro.blog, but it actually works on any blog. Here’s a post from Vincent Ritter using it, even though his blog is hosted somewhere else.

|
Embed
colinwalker
colinwalker

@manton You're missing the close quote after ?url= on the conversation.js help page. Just in case you hadn't noticed and someone tried copy/pasting.

|
Embed
frankm
frankm

@manton I confess that I still find the process confusing. From what I read I think you can only enable replies in micro.blog if you are using a specific template, which I am not using. I've clicked the checkbox to enable replies but I never see any, so I clearly need to do more.

|
Embed
manton
manton

@frankm If you have a custom template, you can add that line of JavaScript from the help, usually to single.html below your post. I didn't want to automatically edit any templates you've customized.

|
Embed
frankm
frankm

@manton Actually, I am using the default template, but I did add things to the footer. I've just ticked the check box again to see if that works.

|
Embed
frankm
frankm

@manton Never mind... I guess it was operator error.

|
Embed
hall
hall

@manton I’ve added the javascript to my single template, but it's throwing:

Theme error: Error building site: failed to render pages: render of "page" failed: execute of template failed: html/template:post/single.html: ends in a non-text context: {stateURL delimDoubleQuote urlPartQueryOrFrag jsCtxRegexp attrURL elementScript }

|
Embed
manton
manton

@hall Part of the script was truncated in the previous version of the help page, so make sure you've got the latest version. If it still doesn't work, email the template to help@micro.blog because it's difficult to debug here. Thanks!

|
Embed
hall
hall

@manton Ah, missed that - thanks 👍

|
Embed
In reply to
endonend
endonend

@mikehaynes @manton @Vincent for WordPress I just put the JS from Manton's post in my single post template, wrapped it with the default WordPress comment divs, and even used Manton's CSS. Here's an example output: endonend.org/2020/02/1... (the top Join the Conversation... area) -- want to add more styling eventually.

|
Embed
endonend
endonend

@mikehaynes awesome! Yeah forgot to mention I had to use WP permalink code in JS. Glad you got it working.

|
Embed
vincent
vincent

@mikehaynes Looks like you managed to get it to work! Looking really really good 👍

|
Embed
hall
hall

@manton Is there an element I can isolate in my micro.blog hosted timeline, to signify a Conversation, which I can then either put an icon on or reveal “Conversation” so people can then go through to that conversation on the Post page. Otherwise how do folks know which posts have chat? Similar to the way the official mb timeline reveals the Conversation link.

|
Embed
manton
manton

@hall That would require writing a little JavaScript snippet right now that gets run for each blog post. It can pull in the conversation and if there is at least 1 reply, add a link similar to what Micro.blog does. I can try to put an example together for the help page.

|
Embed
hall
hall

@manton That would be great! Thanks.

|
Embed