From 33cf9263f54c99801920d3459fd17adcb6106848 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 24 Feb 2021 12:49:28 -0500 Subject: [PATCH] Support "nosig" shortcode to hide signature in post If a post contains anywhere in the body, the post will render without a post signature on it. Ref T815 --- postrender.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/postrender.go b/postrender.go index b9ef07c..12c4a81 100644 --- a/postrender.go +++ b/postrender.go @@ -64,6 +64,10 @@ func (p *Post) augmentContent(c *Collection) { // Don't augment posts that are pinned return } + if strings.Index(p.Content, "") > -1 { + // Don't augment posts with the special "nosig" shortcode + return + } // Add post signatures if c.Signature != "" { p.Content += "\n\n" + c.Signature