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)
Installation
Section titled “Installation”Add the plugin to your Gemfile:
gem "jekyll_jam_comments"Then run bundle install.
Configuration
Section titled “Configuration”You can set these values as environment variables:
| Variable | Description |
|---|---|
JAM_COMMENTS_DOMAIN | Your site’s domain (without “https://“) |
JAM_COMMENTS_API_KEY | Your 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 developmentAdd 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.
Customizing UI Text
Section titled “Customizing UI Text”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"| Property | Default |
|---|---|
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” |
Contributing
Section titled “Contributing”Found a bug or have an improvement? Open an issue or pull request on GitHub.