This commit is contained in:
xing 2022-10-06 21:53:54 +08:00
parent 31c53c9731
commit 1ea3cdff7b
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,7 @@ func Feed() func(ctx *gin.Context) {
common.PasswdProjectContent(&t) common.PasswdProjectContent(&t)
} }
l := "" l := ""
if t.CommentStatus == "open" { if t.CommentStatus == "open" || t.CommentCount > 0 {
l = fmt.Sprintf("%s/p/%d#comments", models.Options["siteurl"], t.Id) l = fmt.Sprintf("%s/p/%d#comments", models.Options["siteurl"], t.Id)
} }
user := common.GetUser(c, t.PostAuthor) user := common.GetUser(c, t.PostAuthor)

View File

@ -26,7 +26,9 @@
<item> <item>
<title>{{$v.PostTitle}}</title> <title>{{$v.PostTitle}}</title>
<link>{{$v.Link}}</link> <link>{{$v.Link}}</link>
{{if $v.CommentLink}}
<comments>{{ $v.CommentLink}}</comments> <comments>{{ $v.CommentLink}}</comments>
{{end}}
<dc:creator><![CDATA[{{$v.Username}}]]></dc:creator> <dc:creator><![CDATA[{{$v.Username}}]]></dc:creator>
<pubDate>{{$v.Date}}</pubDate> <pubDate>{{$v.Date}}</pubDate>
<category><![CDATA[{{$v.Cates}}]]></category> <category><![CDATA[{{$v.Cates}}]]></category>