Comment section on Obsidian Publish

The only thing stopping me from using Publish as my personal site is the absence of a comment section that would make interaction with the users possible. Any plans to add it? :slight_smile:


I really like this idea, as it helps know what parts of my published website people are engaging with the most.


this is interesting! ideally it would have to be something that can be activated per specific note I would say.

What I mean is, I don’t think it would work for an entire vault, but better to choose which specific notes allow comments and which ones don’t/

Also there might have to be a filter where only approved comments get posted.

Those are my thoughts on it, ideally these could be settings that the user gets to toggle on or off, this is the use case I can think of when it comes to my personal use of publish


I was actually thinking of a fixed comment section; every note would have it, exactly like a normal blog.



1 Like

We strongly recommend you to search the forum with possible keywords before making a new feature request. If your request is very similar to an existing one, consider liking it and/or making a comment rather than making a new one. Once you’ve searched and determined that this is a new request, delete this line.

Use case or problem

I would like to have a built in feature to be able to allow for users commenting posts through Publish.

Proposed solution

Maybe by allowing some form of scripting so we can choose commenting platforms or build one in into Obsidian Publish.

Current workaround (optional)

Related feature requests (optional)

Using this feature, Discourse can automatically generate topics each time a new post is published, then embed an IFRAME of the replies to that topic as comments in the post. This is a feature I’m currently using in Ghost and would be missed when I migrate to Obsidian Publish.

To enable all Obsidian pages to have their own comments, we need Publish to insert the same following HTML snippet on all pages, but replace the value passed to discourseEmbedURL with the current Obsidian page’s URL.

<div id='discourse-comments'></div>

<script type="text/javascript">
  window.DiscourseEmbed = { discourseUrl: '',
                     discourseEmbedUrl: '' };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = window.DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

Assuming there’s nothing unusual about Obsidian Publish’ layout, this should be all we need to do on the Obsidian end to make this work. When a page on the Publish site is visited for the first time, the IFRAME will try to load the comments, then crawl the contents of the page and prompt Discourse to create a new topic if the comments don’t exist yet.

So other than these HTML snippets, everything else is handled on Discourse’s end (as far as I’m aware).


The lack of this feature is the only thing that currently keeps me from using obsidian publish. @jacklaing Could one solve this (for the moment) by adding the html snippet manually to individual notes?

Getting comments on my Obsidian Publish site This looks like a starting point! Thank you, Jenna!

Unfortunately it looks like the author of this has shut the server down…

is there a solution for this? Would love to be able to have my publish commented upon…


1 Like

You may find my current solution here: Integrating Comments in Obsidian Publish - Sparrow's Digital Garden


Hey there! I just wanted to confirm something with you. I recall reading an article you wrote regarding a particular topic, but unfortunately, it didn’t have a live demo. I was wondering if the information in the article is still reliable and up-to-date. Would you mind letting me know if it still works? Thanks in advance!

Okay, it works.
Thanks a lot.