Enable comments and configure spamfilter

For the blogpost pages it's possible to enable comments. Spam bots love these kind of features but you don't want spam on your blog. This page describes how to enable comments and get them checked by a spamfilter. Comments are only available for blog post pages because on regular text pages they make less sense. In the HST configuration you can turn the commenting feature on or off. By default commenting is turned on.

Turn on/off comments

Comments are enabled/disabled based on the URL of the blogpost. In this way you can configure to only allow comments on blogposts from the folder "2010" or disable comments for a specific blogpost. When a comment is submitted, you will receive an email notification.

  • Login to the CMS console at  http://localhost:8080/cms/console/ 
  • Go to  /hst:configuration/hst:configuration/hst:sitemap/blogposts/_default_/_default_/_default_.html
  • The hst:parameternames and hst:parametervalues are key-value pairs. Find the value that is on the same position as the key "enableComments". If you want to turn comments off, set its value to "false". To turn it on, set it to "true" (without quotes).
  • Go to /hst:configuration/hst:configuration/hst:pages/detail/article and configure these properties

HST parameters for mail notification

 hst:parametername

 hst:parametervalue

 mail.smtp.host

 SMTP hostname or IP address that can send mails

 sender.email

 sender email address for the mail notification

 receiver.email

 email address that receives the mail notification


Configure Akismet spamfilter

If configured, the weblog demo used Akismet to check if the submitted comment is spam. If Akismet marks the comment as spam, it will not be added to the CMS (you will see a log message). Akismet is free for personal (small) blogs. 

  • Go to Akismet and sign up for an API key
  • In the CMS console go to /hst:configuration/hst:configuration/hst:pages/detail/article
  • The hst:parameternames and hst:parametervalues are key-value pairs. The following parameters need to be configured

HST parameters for spam checking

hst:parametername

 hst:parametervalue

spamfilter.apikey

 The API key you received from Akismet 

spamfilter.websiteurl 

 The URL of your website