Adding a comment section to the page
Adding a Comment Function to the Digital Garden page
Selected commenting platform option: Disqus
Step1: Create a Disqus account
You need to first create a Disqus account and configure it for your site.
Follow the instruction at the official Disqus website.
Step2: Add comment.njk file to the digital garden repository
You need to then add a file called comment.njk
in your GitHub repository.
The file must be placed to a folder following the namespace rule. For instance, the comment.njk
must be located at `src/site/_includes/components/user/note/footer
See Namespaces for the namespace rules.
Other references:
Reddit Post: https://www.reddit.com/r/ObsidianMD/comments/10pokli/i_built_a_digital_garden_using_obsidian_for_free/
- Reddit post: Digital Garden using Obsidian
- Documentation: Adding Custom Components
- uroybd’s repository Files:
note.njk
: View on GitHubcomment.njk
: View on GitHub
Identified Issues and Solutions
Problem1: Width of the comment section
Issue:
When copying the default Disqus embed code, the width of the comment section may not align properly with the webpage layout.
Solution
Modify the first line of the Disqus embed code as follows:
<div class="content"><div id="disqus_thread"></div></div>
Problem 2: Turn off reaction buttons
Issue:
Reaction buttons may be enabled by default in Disqus.
Solution:
You can turn off reaction buttons via the Disqus dashboard:
- Navigate to the "Reactions" settings.
- Disable the reaction buttons as needed.
For further details, refer to the Disqus help documentation: Reactions Guide.