Posting a comment without JavaScript

Chris Buckley edited this page Sep 10, 2018 · 1 revision

Thanks to Staticman comment spam, I have had to enable reCAPTCHA on the blog.

I chose to use invisible reCAPTCHA, which is the least obtrusive to visitors when commenting, however it does require JavaScript to use. There is a <noscript> version of reCAPTCHA, but the invisible version is not supported. It seemed best to use the JavaScript version (but I have added some tracking out of interest).

Posting without JavaScript

In order to post a comment, you'll need to do the job of Staticman yourself: create a pull request.

In the folder _data/comments, you can see a number of folders where the name matches the post's page.slug. If the post folder doesn't exist, you'll need to create the correct folder name.

You can then create a YAML file with any name, as long as the content is as follows:

name: Your Name
comment: Your comment
date: TIMESTAMP

In this, TIMESTAMP must be a Unix timestamp. A timestamp can be obtained from https://www.unixtimestamp.com/.

Once you've created this comment file, create a pull request!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.