diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | i18n/en.toml | 3 | ||||
-rw-r--r-- | i18n/pt.toml | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 7 | ||||
-rw-r--r-- | layouts/partials/nav.html | 3 |
6 files changed, 18 insertions, 5 deletions
@@ -110,6 +110,9 @@ already implemented: can be focused by people who need a keyboard to navigate the web (see [PR #5](https://github.com/clente/hugo-bearcub/pull/5) by [@2kool4idkwhat](https://github.com/2kool4idkwhat) for more information). +- Reply by email: if you supply an email address, the theme creates a "Reply to + this post by email" button at the end of every post (see Kev Quirk's [original + implementation](https://kevquirk.com/adding-the-post-title-to-my-reply-by-email-button)). - Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by writing the CSS you need in `assets/{custom_css}.css` and then including `style: "{custom_css}.css"` in the [front @@ -208,7 +211,7 @@ enableRobotsTXT = true # Social media. Delete any item you aren't using to make sure it won't show up # in your website's metadata. [social] - email = "me@example.com" # Added to the navbar so readers can reply to posts + email = "me@example.com" # Added to the footer so readers can reply to posts twitter = "example" # Twitter handle (without '@') facebook_admin = "0000000000" # Facebook Page Admin ID ``` diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3b68b53..b6c67c8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -79,6 +79,6 @@ enableRobotsTXT = true # Social media. Delete any item you aren't using to make sure it won't show up # in your website's metadata. [social] - email = "me@example.com" # Added to the navbar so readers can reply to posts + email = "me@example.com" # Added to the footer so readers can reply to posts twitter = "example" # Twitter handle (without '@') facebook_admin = "0000000000" # Facebook Page Admin ID diff --git a/i18n/en.toml b/i18n/en.toml index b7738dd..15a8569 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -7,5 +7,8 @@ [email-subject] other = "Reply to " +[email-reply] + other = "Reply to this post by email" + [skip-link] other = "Skip to main content"
\ No newline at end of file diff --git a/i18n/pt.toml b/i18n/pt.toml index 33fc65f..ad228ab 100644 --- a/i18n/pt.toml +++ b/i18n/pt.toml @@ -7,5 +7,8 @@ [email-subject] other = "Resposta a " +[email-reply] + other = "Responda a este post por email" + [skip-link] other = "Pular para conteúdo principal"
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cd6b095..30de616 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,4 +17,11 @@ <a class="blog-tags" href="{{ .Permalink }}">#{{ .LinkTitle }}</a> {{ end }} </p> +{{ with .Site.Social.email }} + <p> + <a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'> + {{ i18n "email-reply" }} ↪ + </a> + </p> +{{ end }} {{ end }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 2cc03a2..e78affe 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,9 +1,6 @@ {{ range .Site.Menus.main.ByWeight }} <a href="{{ .URL }}">{{ .Name }}</a> {{ end }} -{{ with .Site.Social.email }} -<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>Email</a> -{{ end }} <a href="{{ relLangURL .Site.Params.blogPath }}/index.xml">RSS</a> <!-- Convert this page's translations into a dict --> |