Post Signature

Is there a way to include a post signature that could be applied to either all posts, or to only a certain category or type of post (say only long-form ones with a title)?

Specifically I’m looking to add a reply via email link to the bottom of each long-form post only (if that’s possible) that will automatically populate the person’s subject field with the post title.

You can create a partial that’s got your “signature”, and then wrap that in if like so:

{{ if isset .Params "title" }}
    {{ partial signature.html . }}
{{ end }}

and add that to your post/single.html template. I guess you don’t need to use a partial and could inline the mailto link.

This is awesome, thanks so much! :pray:

Love this idea!
For long posts, signing off with an email signature containing your key links can be super effective branding. For now, I’m just copy-pasting HTML into the Markdown post editor!
Looks cool that you’re gonna be able to automate it.

I use it especially to differentiate my professional arts posts from tech / personal ones, I often add my Cerulean email signature at the bottom of posts (e.g.).
Is there an equivalent if-statement for posts from certain M.b. Category e.g. ‘Arts’ @jsonbecker? Would this still work if Categories are triggered by auto-Filters in M.b.?

Yes, categories are stored in front matter in Hugo under a page’s params. So something like

{{ if in .Params "categories" "Arts" }}
{{ end }}

Would work in your single.html template to only do some set of HTML when the post/page has the category “Arts” set.