From 5088638936b577652518da20e23fd627f5326dc4 Mon Sep 17 00:00:00 2001 From: Mordecai K <39312305+insidemordecai@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:42:39 +0300 Subject: [PATCH 1/3] feat: add reply via email functionality --- config/_default/languages.en.toml | 1 + config/_default/params.toml | 2 ++ layouts/_default/single.html | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index e334ec9a..1c293d19 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -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" diff --git a/config/_default/params.toml b/config/_default/params.toml index fc4edcb2..8963d98d 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -12,6 +12,8 @@ autoSwitchAppearance = true enableSearch = true enableCodeCopy = false +replyByEmail = false + # mainSections = ["section1", "section2"] # robots = "" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ad07f7d3..b208e92d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -81,6 +81,11 @@
` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. |
+| `replyByEmail` | `false` | Whether the reply-by-email link is enabled after post. The `author.email` parameter in `config/_default/languages.en.toml` must be set. |
| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. |
| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. |
| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. |
From 47b99754e13b59df0e9d8fa41277b0e3189b812e Mon Sep 17 00:00:00 2001
From: Mordecai K <39312305+insidemordecai@users.noreply.github.com>
Date: Mon, 5 Aug 2024 11:30:56 +0300
Subject: [PATCH 3/3] style(reply-by-email): separation from content
Add more separation from the content by adding a top margin
Add button-like styling to differentiate the link
---
layouts/_default/single.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b208e92d..0331f6a6 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -84,7 +84,13 @@
{{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
{{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
{{ if $replyByEmail }}
- Reply by Email
+
+
+ Reply by Email
+
+
{{ end }}