Add includes for static-based comments powered by Staticman
- Configure Staticman with sane defaults - Build comment form to capture new comments and ajax data to Staticman - Build comments view that iterates over `_data/comments/post-slug/*.yml` files
This commit is contained in:
22
_includes/comment.html
Normal file
22
_includes/comment.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<article id="comment{{ include.index }}" class="js-comment comment">
|
||||
<div class="comment__avatar-wrapper">
|
||||
<img class="comment__avatar" src="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=80">
|
||||
</div>
|
||||
<div class="comment__content-wrapper">
|
||||
<h3 class="comment__author">
|
||||
{% if (include.url) and (include.url != '@url') %}
|
||||
<a rel="nofollow" href="{{ include.url }}">{{ include.name }}</a>
|
||||
{% else %}
|
||||
{{ include.name }}
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p class="comment__date">
|
||||
{% if include.date %}
|
||||
{% if include.index %}<a href="#comment{{ include.index }}">{% endif %}
|
||||
<time datetime="{{ include.date | date_to_xmlschema }}">{{ include.date | date: "%B %d, %Y at %I:%M %p" }}</time>
|
||||
{% if include.index %}</a>{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ include.message | markdownify }}
|
||||
</div>
|
||||
</article>
|
||||
Reference in New Issue
Block a user