mirror of
https://github.com/writeas/writefreely
synced 2025-02-01 00:56:49 +01:00
Merge pull request #437 from writeas/post-signature-pinned-posts
Post signature improvements
This commit is contained in:
commit
811f996e84
@ -60,6 +60,14 @@ func (p *PublicPost) formatContent(cfg *config.Config, isOwner bool) {
|
||||
}
|
||||
|
||||
func (p *Post) augmentContent(c *Collection) {
|
||||
if p.PinnedPosition.Valid {
|
||||
// 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…
x
Reference in New Issue
Block a user