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
pull/437/head
Matt Baer 4 years ago
parent a10827cd50
commit 33cf9263f5
  1. 4
      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, "<!--nosig-->") > -1 {
// Don't augment posts with the special "nosig" shortcode
return
}
// Add post signatures
if c.Signature != "" {
p.Content += "\n\n" + c.Signature

Loading…
Cancel
Save