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 // Don't augment posts that are pinned
return return
} }
if strings.Index(p.Content, "<!--nosig-->") > -1 {
// Don't augment posts with the special "nosig" shortcode
return
}
// Add post signatures // Add post signatures
if c.Signature != "" { if c.Signature != "" {
p.Content += "\n\n" + c.Signature p.Content += "\n\n" + c.Signature

Loading…
Cancel
Save