Support "nosig" shortcode to hide signature in post

If a post contains <!--nosig--> anywhere in the body, the post will render
without a post signature on it.

Ref T815
This commit is contained in:
Matt Baer 2021-02-24 12:49:28 -05:00
parent a10827cd50
commit 33cf9263f5

View file

@ -64,6 +64,10 @@ func (p *Post) augmentContent(c *Collection) {
// Don't augment posts that are pinned
return
}
if strings.Index(p.Content, "<!--nosig-->") > -1 {
// Don't augment posts with the special "nosig" shortcode
return
}
// Add post signatures
if c.Signature != "" {
p.Content += "\n\n" + c.Signature