I you already use version 2 of this plugin, read the upgrade guide instead, as there a several breaking changes!
Installation
Install the Komments plugin using one of these two methods:
- composer (recommended):
composer require mauricerenck/komments
- zip file: unzip main.zip as folder
site/plugins/komments
If you never installed a plugin before, the plugins
folder might be missing. In this case, simply create the folder.
Basic setup
At first, you have to decide how to store comments. The recommended way is to use a SQLite database. If you would rather not use a database, you can store comments in your page files instead, but keep in mind that some features will not be available in this case.
Using SQLite to store comments
Set the storage type to sqlite
(default) and define a path to where the database should be stored:
'mauricerenck.komments.storage.type' => 'sqlite',
'mauricerenck.komments.storage.sqlitePath' => './content/.db/',
The database will be created automatically, so no filename is required here.
Using page files
If you want to use the file storage type, you need to set the following configuration:
'mauricerenck.komments.storage.type' => 'markdown',
Disabling comment migration
You won't need to migrate comments on a fresh installation of the plugin. So you can disable the feature right away by setting:
'mauricerenck.komments.migrations.comments' => false
This feature is disabled by default to make it easy for existing users to migrate their old comments.
Testing the configuration
This is all you need to do to set up the plugin. You should check if everything is working. In the case of SQLite, migrations will run the first time you access your page. So open your website and check the sqlitePath
you defined. There should be a file named komments.sqlite
in there.
When you log in to the panel, you should see a menu entry on the left named "Komments".
If you don't see the new menu entry, there might be two reasons:
- something went wrong when installing the plugin
- you defined a custom menu and need to add the Komments view to your custom setup
Write a comment