mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-12 19:12:18 +00:00
update reply by email generation
This commit is contained in:
parent
e9c5952076
commit
bf7823c56f
2 changed files with 9 additions and 3 deletions
|
@ -45,7 +45,11 @@
|
|||
|
||||
---
|
||||
{{ $subject := printf "Re: %s" .Title -}}
|
||||
=> mailto:blog@runtimeterror.dev?subject={{ urlquery $subject | replaceRE `\+` "%20" }} 📧 Reply via email
|
||||
{{ $subject := urlquery $subject | replaceRE `\+` "%20" }}
|
||||
{{ $path := path.BaseName . | strings.TrimSuffix ")" -}}
|
||||
{{ $address := printf "blogreply.%s@%s" $path "runtimeterror.dev" -}}
|
||||
|
||||
=> mailto:{{ $address }}?subject={{ $subject }} 📧 Reply by email
|
||||
{{ $related := first 3 (where (where .Site.RegularPages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
{{ if $related }}
|
||||
## Related articles
|
||||
|
|
|
@ -57,8 +57,10 @@
|
|||
{{- else if eq .Params.emailReplies false }}
|
||||
{{- $emailReplies = false }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Site.Params.comments true) (ne $emailReplies false) }}
|
||||
<span class="post_email_reply"><a href="mailto:blogreply-{{ .Title | truncate 40 | urlize}}@runtimeterror.dev?Subject=Re: {{ .Title }}">📧 Reply by email</a></span>
|
||||
{{- if and (eq .Site.Params.comments true) (eq $emailReplies true) }}
|
||||
{{- $path := path.BaseName . | strings.TrimSuffix ")" }}
|
||||
{{- $address := printf "blogreply.%s@%s" $path "runtimeterror.dev" }}
|
||||
<span class="post_email_reply"><a href="mailto:{{ $address }}?Subject=Re: {{ .Title }}">📧 Reply by email</a></span>
|
||||
{{- end }}
|
||||
<br><details class="comments_widget"><summary>Comments</summary>
|
||||
{{- partial "comments" . }}
|
||||
|
|
Loading…
Reference in a new issue