diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index 5e7cae34..9905ea3d 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" # imageQuality = 96 # headline = "I'm only human" diff --git a/config/_default/params.toml b/config/_default/params.toml index 509bc279..8ec5457f 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/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 491d947a..3b6e7752 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -140,6 +140,7 @@ The default file can be used as a template to create additional languages, or re | Name | Default | Description | | --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | +| `author.email` | _Not set_ | The author's email. This will be used if the reply-via-email functionality is enabled. | | `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | | `author.imageQuality` | `96` | The author's image file will be treated as a "high quality" image to minimize artifacts on the front page. Value range 1-100. | | `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | @@ -172,6 +173,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. | | `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | | `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` 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. | | `forgejoDefaultServer` | _Not set_ | The default `server` parameter for the `forgejo` shortcode. | | `giteaDefaultServer` | _Not set_ | The default `server` parameter for the `gitea` shortcode. | | `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. | diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5e85aeb0..17718903 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -81,6 +81,17 @@
{{ .Content }} + {{ $defaultReplyByEmail := .Site.Params.replyByEmail }} + {{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }} + {{ if $replyByEmail }} + + + Reply by Email + + + {{ end }}
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}