Browse Source

Changed comments URL structure.

gh-pages
Franco Masotti 2 years ago
parent
commit
cea717a494
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 4
      _config.yml
  2. 6
      _includes/comments.html

4
_config.yml

@ -19,7 +19,7 @@ software:
author:
name: "Franco Masotti"
email: "franco.masotti@live.com"
email: "frnmst.blog@outlook.com"
buymeacoffee:
message: "Buy me a coffee"
url: "https://buymeacoff.ee/frnmst"
@ -138,7 +138,7 @@ defaults:
## Other Params
include: [ "_pages" ]
exclude: [ "LICENSE", "README.md", "CNAME", "vendor", "Gemfile", "Makefile" ]
exclude: [ "LICENSE", "README.md", "CNAME", "vendor", "Gemfile", "Makefile", "Pipfile", "Pipfile.lock", ".pre-commit-config.yaml" ]
## Ruby gems
plugins:

6
_includes/comments.html

@ -4,13 +4,13 @@
{% 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 %}
{% capture mailto_subject %}{{ page.path | remove: ".md" | remove: "_posts/" | urlencode }}{% endcapture %}
{% else %}
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" }}{% endcapture %}
{% capture mailto_subject %}{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" | urlencode }}{% endcapture %}
{% endif %}
<div>
<h3>
<a href="mailto:{{ mailto_prefix }}@{{ mail_domain }}">
<a href="mailto:{{ mail_username }}@{{ mail_domain }}?subject={{ mailto_subject }}">
Post a new comment</a>
</h3>
</div>