From 1ea3cdff7b73f957265acdb4e53390c1c0a894a5 Mon Sep 17 00:00:00 2001 From: xing Date: Thu, 6 Oct 2022 21:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actions/feed.go | 2 +- templates/feed/feed.gohtml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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}}