_includes/comments.html in minimal-mistakes-jekyll-4.11.1 vs _includes/comments.html in minimal-mistakes-jekyll-4.11.2
- old
+ new
@@ -75,20 +75,22 @@
</div>
<div class="form-group hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
- <input type="hidden" name="options[reCaptcha][siteKey]" value="{{ site.reCaptcha.siteKey }}">
- <input type="hidden" name="options[reCaptcha][secret]" value="{{ site.reCaptcha.secret }}">
+ {% if site.reCaptcha.siteKey %}<input type="hidden" name="options[reCaptcha][siteKey]" value="{{ site.reCaptcha.siteKey }}">{% endif %}
+ {% if site.reCaptcha.secret %}<input type="hidden" name="options[reCaptcha][secret]" value="{{ site.reCaptcha.secret }}">{% endif %}
</div>
<!-- Start comment form alert messaging -->
<p class="hidden js-notice">
<strong class="js-notice-text"></strong>
</p>
<!-- End comment form alert messaging -->
- <div class="form-group">
- <div class="g-recaptcha" data-sitekey="{{ site.reCaptcha.siteKey }}"></div>
- </div>
+ {% if site.reCaptcha.siteKey %}
+ <div class="form-group">
+ <div class="g-recaptcha" data-sitekey="{{ site.reCaptcha.siteKey }}"></div>
+ </div>
+ {% endif %}
<div class="form-group">
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</div>
</form>
</div>
\ No newline at end of file