Tek Eye Logo

Tek Eye

Add Disqus to Website Built with ↓markdown↓ CMS

Update: Support for Disqus has been removed from ↓markdown↓ CMS. The free version of Disqus now bloats a web page with poor quality advertising. This is unsuitable for an open source Content Management System (CMS). Those wanting to use Disqus with ↓markdown↓ CMS can refer to the code history on the GitHub repository for the relevant files (md-comment.php, md-disqus.txt, index.php).

The Disqus solution is a 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.

↓markdown↓ CMS Logo

Introduction

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.

See Also

There are more tutorials covering ↓markdown↓ CMS in the article Build a Website from Scratch with ↓markdown↓ CMS.

Author:  Published:  Archived:

ShareSubmit to TwitterSubmit to FacebookSubmit to LinkedInSubmit to redditPrint Page

Do you have a question or comment about this article?

(Alternatively, use the email address at the bottom of the web page.)

 This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

markdown CMS Small Logo Icon ↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.


Articles on:

Android Programming and Android Practice Projects, HTML, VPS, Computing, IT, Computer History, ↓markdown↓ CMS, C# Programming, Using Windows for Programming


Free Android Projects and Samples:

Android Examples, Android List Examples, Android UI Examples



Tek Eye Published Projects