Skip to content

Commit

Permalink
Fix staticman v2/v3 comments (mmistakes#2351)
Browse files Browse the repository at this point in the history
According to the most recent docs, `branch` and `endpoint` should be inside `site.comments.staticman` config.
  • Loading branch information
akhy authored and jesuswasrasta committed Jul 8, 2020
1 parent 226338c commit 3b27b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
{% when "staticman_v2" %}
<section id="static-comments">
{% if site.repository and site.staticman.branch %}
{% if site.repository and site.comments.staticman.branch %}
<!-- Start static comments -->
<div class="js-comments">
{% if site.data.comments[page.slug] %}
Expand All @@ -35,7 +35,7 @@ <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_titl
<div class="page__comments-form">
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.staticman.endpoint | default: 'https://api.staticman.net/v2/entry/' }}{{ site.repository }}/{{ site.staticman.branch }}/comments">
<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.comments.staticman.endpoint | default: 'https://api.staticman.net/v2/entry/' }}{{ site.repository }}/{{ site.comments.staticman.branch }}/comments">
<div class="form__spinner">
<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
Expand Down

0 comments on commit 3b27b81

Please # to comment.