diff --git a/actions/feed.go b/actions/feed.go index f25b4fb..73c0e45 100644 --- a/actions/feed.go +++ b/actions/feed.go @@ -55,7 +55,7 @@ func Feed() func(ctx *gin.Context) { common.PasswdProjectContent(&t) } l := "" - if t.CommentStatus == "open" { + if t.CommentStatus == "open" || t.CommentCount > 0 { l = fmt.Sprintf("%s/p/%d#comments", models.Options["siteurl"], t.Id) } user := common.GetUser(c, t.PostAuthor) diff --git a/templates/feed/feed.gohtml b/templates/feed/feed.gohtml index 8369fb6..22d962d 100644 --- a/templates/feed/feed.gohtml +++ b/templates/feed/feed.gohtml @@ -26,7 +26,9 @@ {{$v.PostTitle}} {{$v.Link}} - {{ $v.CommentLink}} + {{if $v.CommentLink}} + {{ $v.CommentLink}} + {{end}} {{$v.Date}}