Skip to content

Jekyll Integration

Jekyll is the original Jamstack static site generator. This guide shows you how to add JamComments to your Jekyll site. Before starting, you’ll need:

  • A JamComments account
  • A site created in your account
  • An API key (get one in your account settings)

Add the plugin to your Gemfile:

gem "jekyll_jam_comments"

Then run bundle install.

You can set these values as environment variables:

VariableDescription
JAM_COMMENTS_DOMAINYour site’s domain (without “https://“)
JAM_COMMENTS_API_KEYYour API key from account settings
JAM_COMMENTS_ENVIRONMENT”production” or “development” (optional, defaults to JEKYLL_ENV)

Or configure them in your _config.yml:

jam_comments:
domain: your-site.com
api_key: your-api-key
environment: production # or development

Add the {% jam_comments %} Liquid tag where you want comments to appear:

<div class="post">
<!-- Your post content -->
</div>
{% jam_comments %}

The plugin automatically uses page.url to determine which page the comments belong to.

Override the default text in your _config.yml:

jam_comments:
domain: your-site.com
api_key: your-api-key
copy:
comment_placeholder: "Share your thoughts..."
submit_button: "Post Comment"
name_placeholder: "Your name"
PropertyDefault
confirmation_message”Comment successfully submitted!”
submit_button”Submit”
name_placeholder(empty)
email_placeholder(empty)
comment_placeholder”Write something in plain text or Markdown…”
write_tab”Write”
preview_tab”Preview”
auth_button”Log In or Register”
log_out_button”Log Out”

Found a bug or have an improvement? Open an issue or pull request on GitHub.