Add Disqus to Website Built with ↓markdown↓ CMS
The Disqus solution is a popular comments system for websites. Disqus can be added to a website built with ↓markdown↓ CMS. This article provides a quick overview in enabling Disqus on a ↓markdown↓ CMS based website.
The ability to add a comment on an article or web post is seen as a way to engage website visitors, gather feedback and encourage repeat visits. There are several existing solutions that enable websites to support comments in their pages. Many require the use of a database. However, a comments system that uses as database is not suitable for a website built using ↓markdown↓ CMS, since it is a no database CMS.
Adding the Disqus Comments System
This article assumes that your ↓markdown↓ CMS based website is up and running. If not see the list of tutorials in the article Build a Website from Scratch with ↓markdown↓ CMS. In particular the web site configuration file needs to be set up as described in the article Website Home Page for ↓markdown↓ CMS.
Create a Disqus Account
If you do not have a Disqus account head over to their website and create one. Once your website domain has been set up in Disqus you'll have a Disqus shortname to use in the ↓markdown↓ CMS configuration file.
Configuring the Disqus Comments System in ↓markdown↓ CMS
A ↓markdown↓ CMS based website uses the Disqus Universal Embed Code. This requires a Disqus shortname for it to operate. This shortname is used to add Disqus to the website. The shortname needs to be added to the website's ↓markdown↓ CMS configuration file. Using your website's control panel edit the site-config.php file and add the entry
DISQUS-SHORTNAME in the
$MD_SETTINGS array, setting the value to the site's Disqus shortname:
. . . "DISQUS-SHORTNAME" => "your-shortname", "XML_SITEMAP_REFRESH" => "-1 week" );
Enabling Comments on an Article
Disqus comments are added on an article by article basis. To enable comments on an article set the Comments article meta-data value to any value other than No, for example
Comments: Yes. (See the article Web Page Title Tag in ↓markdown↓ CMS for an introduction to article meta-data). For example with comments enabled for this web page the article meta-data is similar to the following:
/* Title: Add Disqus to Website Built with ↓markdown↓ CMS Published: 2017-01-23 Comments: Yes */
With the meta-data setting
Comments added for an article the Disqus comment system then displays. It is at the bottom of the article. A viewer who has a Disqus account can now add a comment to the web page.
There are more tutorials covering ↓markdown↓ CMS in the article Build a Website from Scratch with ↓markdown↓ CMS.
Author:Daniel S. Fowler Published: