colinwalker
colinwalker
I quite like it where blogs give the option to reply via email — they're often static sites that have no comment feature. I wonder about adding that to (b)log-In but equally wonder/worry about how. It would make sense to have an envelope icon next to the comment toggle but that might ma... colinwalker.blog
|
Embed
cdevroe
cdevroe

@colinwalker What about a checkbox under the "Leave A Reply" subheading with the label "Send privately as email?"

|
Embed
colinwalker
colinwalker

@cdevroe That's an idea, a little more complicated to implement but definitely an option. Thanks for the idea.

|
Embed
amit
amit

@colinwalker Thank you for reminding me that I need to include such an option. I did -- haven't given it too much though; just included a link below every post. But works because I don't have a commenting system.

|
Embed
pimoore
pimoore

@colinwalker After seeing it on a few blogs I follow, I added it to mine and the Tufte theme. I’ve received many replies through it and carried on some great conversations. Highly recommend.

|
Embed
maique
maique

@pimoore I added it to mine after seeing it in yours, and made sure to have the same option on the new project 😊

|
Embed
colinwalker
colinwalker

@pimoore Glad to hear that. The question is, then, not if but how.

|
Embed
pimoore
pimoore

@colinwalker Here’s the code I have in my blog for this:

{{ if .Title }}
        <a class="reply" href="mailto:{{ .Site.Params.mailto }}?subject=Reply to {{ .Title }}">Reply by email</a>
{{ else }}
<a class="reply" href="mailto:{{ .Site.Params.mailto }}?subject=Reply to {{ .Permalink | safeURL }}">Reply by email</a>
{{ end }}

The mailto parameter contains my email address, and then the subject pre-populates with “Reply to [title]” if there is one, otherwise it just inserts the permalink. In your case it would just be a matter of pulling the title or permalink variable wherever they get stored in your system.

|
Embed
colinwalker
colinwalker

@pimoore That's exactly what I've just done 😆👍

|
Embed
pimoore
pimoore

@colinwalker Awesome, it works too… 😉

|
Embed
ridwan
ridwan

@pimoore Where do I add this code?

|
Embed
In reply to
pimoore
pimoore

@ridwan I have mine at the bottom of the /layouts/partials/article.html template, so it shows underneath each post on its own page.

|
Embed