{% capture mail %}{{ site.author.email }}{% endcapture %}
{% assign mail_substring = mail | split: '@' %}
{% assign mail_username = mail_substring[0] %}
{% assign mail_domain = mail_substring[1] %}
{% if page.is_post %}
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".md" | remove: "_posts/" }}{% endcapture %}
{% else %}
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" }}{% endcapture %}
{% endif %}
{% assign comment_counter = 0 %}
{% assign comments = site.comments | sort | reverse %}
{% for comment in comments %}
{% assign page_path = page.path | replace: "_posts/", "" | remove: ".md" %}
{% assign comment_fullpath = comment.path | replace: "_comments/", "" | split: "/" %}
{% assign comment_path = comment_fullpath[0] %}
{% assign comment_id = comment_fullpath[1] | remove: ".md" %}
{% if comment_path == page_path %}
{% assign parity_check = comment_counter | modulo: 2 %}
{% if parity_check == 0 %}
{% assign parity = "even" %}
{% else %}
{% assign parity = "odd" %}
{% endif %}
{% assign comment_counter = comment_counter | plus: 1 %}
{% endif %}
{% endfor %}