I have a blog and I create posts and categories using the CMS. And now need to create an open comments section with likes and a share button and I’m thinking of how this can be implemented.
Is there an API that I can call outside de admin to create these comments and likes? How would be the setup to make this work? Any ideas are welcome!
@Scott thanks for your reply. I read a little of the Staticman docs and it seems it doesn’t fit my needs, as I’m looking for something integrated with NetlifyCMS so I can centralize the comments moderation and post writing in a single place.
Hi @darksoulsong and @Scott, the CMS writes files to your git repo, so if you want any visitor to the site to add comments/likes via the CMS they would need access to your repo which I don’t think is recommended.
You could use an external service for saving the comments (for example https://disqus.com/) and write a custom widget that would use the service API to display the comments and moderate them via the CMS if you want to keep everything in the same place.
I just rebuilt my personal blog in Eleventy and deployed it on Netlify, and I wrote about how I implemented commenting with notifications and moderation, using Netlify Functions and the GitHub API (among other things). Other people have come up with similar solutions too, the way I did it isn’t the only option.
I don’t use Netlify CMS with my site, but my commenting system should be compatible with it. And I’m not sure which SSG you’re using, but it should be possible to implement something similar with most of the other popular ones (e.g. Hugo, Next.js).