Akismet - WeTeam/WeBlog GitHub Wiki
Using Akismet
Akismet is a comment spam prevention service which can be used by websites to automatically classify a comment as safe or as spam. It is a commercial service with a free option for personal websites. Refer to the Pricing & Sign Up page at https://akismet.com/signup/ for more details.
To enable Akismet on your WeBlog site:
- Sign up with Akismet and receive your API key.
- Enter your Akismet API key in the
WeBlog.Akismet.APIKey
Sitecore setting. An empty setting exists in the configuration fileApp_Config\Include\WeBlog.Comments.Handler.config
as reference. - It is recommended not to add you key directly to the
App_Config\Include\WeBlog.Comments.Handler.config
file but instead create a configuration patch file and add the key there. - Ensure the
Enable Comments
field on the blog home item is ticked. - Ensure the
Sitecore.Modules.WeBlog.Pipelines.CreateComment.AkismetSpamCheck
processor is present in theweblogCreateComment
pipeline. - The
weblogCreateComment
pipeline is defined in theApp_Config\Include\WeBlog.Comments.Handler.config
configuration patch file.
During the comment creation process the weblogCreateComment
pipeline is executed and the Sitecore.Modules.WeBlog.Pipelines.CreateComment.AkismetSpamCheck
processor run. This processor will check the comment against Akismet and if the comment is classified as spam the workflow command given by the Sitecore setting WeBlog.Comments.Workflow.Command.Spam
is executed. In a default implementation this will execute the Spam
command on the Created
state of the WeBlog Comments
workflow which will move the comment to the Spam
workflow state.
The simplest way to review spam comments is to use the workbox which will show all the spam comments in the spam state.