Blogger Integration Plugin

Here’s a plugin that automatically posts topics from a Blogger blog to a Discourse site, and maintains a link and comment counts on the Blogger site. It doesn’t embed comments, just links them, requiring readers to go to the associated Discourse site to discuss the topic.

It also provides an optional ‘chained flow’, where a notification post is added to the previous topic when a new topic appears, containing links to the new blog post and topic.

10 Likes

Cool, added you to the plugin authors group, any screen shot?

Good idea. I’ll wait for the next blog post to get an accurate screen shot. :allthethings:

2 Likes

I’ve added screen shots to the readme file.

Here’s a new topic being generated.

and here’s a “New Post!” notification post added to the previous topic:

3 Likes

This is what I am looking for. I have installed the plug-in. Is there a way to verify if the installation is done correctly? It is listed in the Discourse plug-in setting page.

I have also put the codes into Blogger. However, when I click on Comment, it launched a new tab with this error:

Invalid URL http://forum.loopgit.com/blogger/topic?ts=&author=&pl=&nojs=y from . Please let us know how you got this link.

Is the syntax incorrect?

The nojs=y attribute in that link suggests that the javascript code that converts the link dynamically didn’t run in the user’s browser when the page was loaded. Take a look at the error logs in the browser when you navigate to the blogger page, that should give you more of a clue.

2 Likes

Thank you. I suspect that is the case but is at my hair’s end trying to solve it. In your GitHub page, there are two instructions I haven’t followed:

[quote]
Follow the directions for creating an embeddable host on your Discourse site.[/quote]
Is this important as well - I have to include the same script from the link?

And the other one that I’m wondering if it’s necessary is the CORS support.

Both CORS and embedding are necessary.

Thanks sir. Regarding the embedding, what should I do with REPLACE_URL such that it is dynamically assigned for each new post that I created:

[code]

[/code]

Finally! I get 80% of the stuff working. I think the placement of the javascript codes is important.

I placed @kcoop’s “comment-link” and “DiscourseBlogger” and @eviltrout’s embedded codes BEFORE this:

<div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> <b:if cond='data:top.showAuthor'> <data:top.authorLabel/> <b:if cond='data:post.authorProfileUrl'>

and it works.

And as to how to NOT hardcode the post URL into the discourseEmbedUrl: ‘REPLACE_URL’ , you can use

discourseEmbedUrl: '<data:blog.url/>'
3 Likes

Just a note: Blogger will auto correct and replace the single quote ’ with

&#39;

and that will screw up the javascript. I had tried to trouble shoot the inconsistencies of the JavaScript execution, without realizing that the issue was with this innocent looking single quotation code replacement. I am angry at Blogger!

2 Likes

I am going to try my luck here, as I think not many people attempted Blogger integration with Discourse, so if you have any knowledge, I’d appreciate any tips.

The integration went on fine but if I view a group of posts base on a tag, or base on month, Blogger returns, say 3 articles with the same tag. Then the embedded Discourse will show 3 times in the first post, as per screenshot below.

I think it has to do with placement of the codes but I am just too tired at this moment to think about it :slight_smile:

I just looked back at my site, and it follows what I wrote in Blogger Template Configuration in the README.

I’m not sure where you’re getting REPLACE_URL, there is reference to DISCOURSE_URL, which is the URL of your Discourse site. Maybe that’s something from the embed documentation? If so, that might have been the misunderstanding; you need to configure your Discourse site for embed, but not put anything in Blogger template for it.

The codes containing REPLACE_URL is a code snippet in the Settings of Discourse, in which you have to include into the Blogger template, according to the embed documentation. I wondered if the embed part is necessary and I guess you meant assigning the host is needed but not including the codes into the Blogger, as illustrated:

Having said that though, embedding Discourse into the blog is pretty cool too, as it shows you a snapshot of the recent replies:

Is this plugin still usable? Are there any real life examples available?

The GitHib repository hasn’t seen any updates in a year. The demo blog linked there have no comments as far as I can see, and the link to the Discourse instance gives a Not Found.