After creating an account over at manage.comments.sh you will need to setup your website to integrate with the comments.sh api.
The first step is to add your domain to the comments.sh registry. This way our api knows it should process any requests for your website.
Registering your domain can be done in the Authorized Domains UI at manage.comments.sh.
- Click on the Add domain button
- Enter your domain including subdomain, for example https://www.example.org
- Click on Save
Now your domain is registered and authorized to use the comments.sh APIs.
Next you’ll need to connect your website to comments.sh APIs. In order to get you up and running in no time we provide you with a ready to use client.
Simply include the following javacript import on all pages you would like to make use of our comments system.
<script defer src="https://import.comments.sh/v1/static/bundle.min.js"></script>
Note: if you would like to write and use your own client please refer to the API documentation here
Last step is to add a template that our client will use to display the form and comments on your pages. The code snippet below is a basic template showing a comment box with privacy checkbox. Include this on all the pages that include the client script in the location where you want to show the comments.
Don’t change any of the id’s or data attributes as they are used by the default client. You can find more details here if you want to customize your template.
Important! Make sure to replace ‘page-name’ with a value unique for each page. This value will be used to retrieve comments on a page per page basis.
Note: you may need to set display: none on the template tags for IE 11 compatibility
Congratulations! You should now have comments on your webpage.