Resolving Staticman comment errors for Jekyll and Github Pages

The Staticman comment service for statically generated websites such as Jekyll/Github Pages keeps your comments within your website as YML files.

  • Staticman requires your viewers to have JavaScript enabled in their web browser
  • Spam/malicious comments linger in your repository, despite not being shown on the website–this is what made me stop using Staticman
  • Staticman is extremely picky about the _config.yml file–an error in an unrelated section of _config.yml that doesn’t bother Jekyll will cause Staticman to silently fail.

Cleaning up your Jekyll _config.yml

  • be sure you don’t have more than one include: statement
  • be sure you have at least something in your staticman: requiredFields:. Leaving this blank will cause Staticman to silently fail! Put ['messages'] as a minimal requirement, assuming your staticman: allowedFields includes 'message'
  • use the Developer Console (in Chrome, Ctrl Shift i) to see the error messages when you submit your test comment

auto-delete comment branch on accept/reject (optional but highly convenient)

configure webhook for upon Pull Request.

Github webhook configuration page
configure Github webhook for Staticman.

Leave a Comment