Hey there, is there any way to not automatically create a topic for every blog post we publish on our website yet still keep the discussion section?
I feel it makes more sense to generate a topic automatically as long as there’s a comment on a certain blog post. Currently the logic is that the topic should exist before people can comment.
To be clear that we are not using any comment system other than Discourse. So what we want is to create a topic only when there is actually a comment on a post instead of a bunch of empty topics on Discourse like below:
Not really… How are users supposed to reply to a topic if it’s not already posted somewhere? Every topic has to start with 0 reply. I guess I’m missing something here
I think that what you want is have all topics that are pulled to Discourse from your website be marked as unlisted. When a topic receives a comment, it would automatically be marked as listed. Unlisted topics do not appear in the topic list, so this would prevent the topic list on your site from being full of topics with no responses.
This type of configuration makes sense for sites where people are accessing Discourse topics by clicking a “Start Discussion” link that is displayed below a blog post. Discourse does not have a setting for this, but I think it would be a reasonable feature request. The DIscourse WordPress plugin has this functionality, but it uses the Discourse API for unlisting and listing the topics.
@simon That’s exactly what we want! Thanks for your reply. The problem is that our site is not built with WordPress. But we can take a look at the Discourse API.
Speaking of feature requests, where can I raise this request for Discourse?
@Canapin So we want the blog post to receive a comment first BEFORE it is listed as a Discourse topic. The post does exist on our site in the first place, doesn’t it?
That’s a good idea. The other option is to not create the topics until the user clicks through but I think your suggestion might be easier. Perhaps @eviltrout could consider this as a possible task for this release, next week?
The easiest way to figure this out would be to try unlisting and then listing a topic through the Discourse user interface while following the steps outlined in this guide: How to reverse engineer the Discourse API.
To automate the process via the API, you would need to setup a webhook to listen for post events. When you receive a webhook telling you that the first post in your embed category has been created, you would then send an API request to unlist the topic. When you receive a webhook telling you that the second post in a topic has been created, you would then send an API request to list the topic.
As was mentioned above, a better approach might be to have the topic automatically unlisted the first time a user clicks through to the topic from a blog site. That way the first user to leave a comment would not see the topic marked as unlisted. That would be somewhat more complex to setup, but it could be done through the API by listening for click events on links to your Discourse topics.
Ideally, this topic will get updated when the feature becomes available. In that case, you will get a notification about it if you set your notification level for this topic to Watching.