feat: add reply via email functionality

This commit is contained in:
Mordecai K 2024-07-31 16:42:39 +03:00
parent e46afe45cf
commit 5088638936
3 changed files with 8 additions and 0 deletions

View file

@ -15,6 +15,7 @@ title = "Blowfish"
# [author]
# name = "Your name here"
# email = "youremail@example.com"
# image = "img/blowfish_logo.png"
# headline = "I'm only human"
# bio = "A little bit about you"

View file

@ -12,6 +12,8 @@ autoSwitchAppearance = true
enableSearch = true
enableCodeCopy = false
replyByEmail = false
# mainSections = ["section1", "section2"]
# robots = ""

View file

@ -81,6 +81,11 @@
<div class="article-content max-w-prose mb-20">
{{ .Content }}
{{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
{{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
{{ if $replyByEmail }}
<strong><a href="mailto:{{ .Site.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">Reply by Email</a></strong>
{{ end }}
</div>
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}