Parcourir la source

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 il y a 3 ans
Parent
révision
33cf9263f5
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. +4
    -0
      postrender.go

+ 4
- 0
postrender.go Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer