mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 09:33:11 +00:00
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:
parent
a10827cd50
commit
33cf9263f5
1 changed files with 4 additions and 0 deletions
|
@ -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…
Reference in a new issue