diff --git a/README.md b/README.md index 72aa4ac..d92f23f 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ Or clone from GitHub and put in the `user/plugins/comments` folder. # Usage -Edit the - Add `{% include 'partials/comments.html.twig' with {'page': page} %}` to the template file where you want to add comments. For example, in Antimatter, in `templates/item.html.twig`: @@ -51,7 +49,8 @@ To set the enabled routes, create a `user/config/plugins/comments.yaml` file, co # Enabling Recaptcha -The plugin comes with Recaptcha integration. To make it work, add your own Recaptcha `site` and `secret` keys the the plugin yaml config file. +The plugin comes with Recaptcha integration. To make it work, create a `user/config/plugins/comments.yaml` file, copy in it the contents of `user/plugins/comments/comments.yaml` and uncomment the capthca form field and the captcha validation process. +Make sure you add your own Recaptcha `site` and `secret` keys too. # Where are the comments stored? diff --git a/comments.yaml b/comments.yaml index ea24031..a401c97 100644 --- a/comments.yaml +++ b/comments.yaml @@ -50,15 +50,15 @@ form: type: hidden evaluateDefault: grav.uri.path - - name: g-recaptcha-response - label: Captcha - type: captcha - recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3 - recaptcha_not_validated: 'Captcha not valid!' - validate: - required: true - process: - ignore: true +# - name: g-recaptcha-response +# label: Captcha +# type: captcha +# recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3 +# recaptcha_not_validated: 'Captcha not valid!' +# validate: +# required: true +# process: +# ignore: true buttons: - type: submit @@ -68,8 +68,8 @@ form: - email: subject: "[New Comment] from {{ form.value.name|e }}" body: "{% include 'forms/data.html.twig' %}" - - captcha: - recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je +# - captcha: +# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je - addComment: - message: Thank you for writing your comment!