Add hideReply
functionality to pages (#18)
Set the `hideReply` param on front matter to completely remove the "reply to" link present in the bottom of the pages. This is backwards-compatible given that any page that does not have the `hideReply` param will continue to work as before.
This commit is contained in:
parent
729a354f4c
commit
e7b875a1fa
@ -227,7 +227,8 @@ enableRobotsTXT = true
|
|||||||
facebook_admin = "0000000000" # Facebook Page Admin ID
|
facebook_admin = "0000000000" # Facebook Page Admin ID
|
||||||
|
|
||||||
# Author metadata. This is mostly used for the RSS feed of your site, but the
|
# Author metadata. This is mostly used for the RSS feed of your site, but the
|
||||||
# email is also added to the footer of each post
|
# email is also added to the footer of each post. You can hide the "reply to"
|
||||||
|
# link by using a `hideReply` param in front matter.
|
||||||
[params.author]
|
[params.author]
|
||||||
name = "John Doe" # Your name as shown in the RSS feed metadata
|
name = "John Doe" # Your name as shown in the RSS feed metadata
|
||||||
email = "me@example.com" # Added to the footer so readers can reply to posts
|
email = "me@example.com" # Added to the footer so readers can reply to posts
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
|
<a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
|
{{ if not .Params.hideReply }}
|
||||||
{{ with .Site.Params.author.email }}
|
{{ with .Site.Params.author.email }}
|
||||||
<p>
|
<p>
|
||||||
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
|
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
|
||||||
@ -24,3 +25,4 @@
|
|||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user