A drop-in, database-free comment system for Kirby CMS 5+ with moderation, replies, a pending-only inbox view in the Panel and spam protection.
- Frontend comment form (posts to the article URL)
- Panel moderation (approve / deny / delete)
- Pending-only inbox at the Site level
- Approved / pending comment counts
- Create new comments or edit existing
- Add a reply to comment
- Spam protection (honeypot + rate limiting)
- CSRF protection
- Server-side validation
- Easily style the ID's and Classe names from within your own stylesheet to match your website design
- Additional features to come in future updates such as email notification, basic drop in styles, etc
- Visitors submit comments → saved as pending
- Editors open Site → Pending Comments
- Click the article → approve / deny comments
- Approved comments appear on the frontend
Download nomad-kirby-comments.zip
Unzip file
Copy the plugin folder to:
site/plugins/nomad-kirby-comments
Add the comments field to your article blueprint (site/blueprints/pages/article.yml) or whichever template you are using for article.
comments:
extends: fields/commentsAdd this tab to your site/blueprints/site.yml:
tabs:
comments:
label: Pending Comments
icon: chat
sections:
pendingComments:
type: pages
headline: Pending Comments
layout: table
query: site.index.filterBy("intendedTemplate","article").filterBy("comments","*=","pending")
info: "{{ page.pendingCommentsCount }} pending · {{ page.approvedCommentsCount }} approved"
limit: 50
create: false
sortable: false
duplicate: false
status: false
Add this tab within your 'tabs' section to your site/blueprints/site.yml:
articleswithcomments:
label: Articles with Comments
icon: chat
sections:
existingcomments:
type: pages
headline: Articles with Comments
query: site.index.filterBy("intendedTemplate", "article").filterBy("comments", "!=", "")
info: "{{ page.comments.toStructure.count }} comments"
limit: 50
create: false
sortable: false
duplicate: false
status: falseImportant
- Site Tab assumes you are using the template "article". If you use a different named template the "site tab" will not work unless you update the template name within ("intendedTemplate","article") in the site.yml file under the query line.
In your article template:
<?php snippet('comments') ?>Only approved comments display publicly; new submissions are saved as pending.
In your article list loop:
<?php snippet('comment-meta', ['page' => $article]) ?>Important
- This snippet assumes you are using the page "article", if you are using a different page name update the $article variable to match page name. (i.e $post)
Comments are stored in the article content txt file as a YAML structure field.
MIT