summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2025-12-06 14:28:20 +0800
committerBigCoke233 <hi@guhub.cn>2025-12-06 14:28:20 +0800
commitc8ce9509dac7ff88b33a0d6ef9c81a542281717a (patch)
tree8acfd7115dc8b1f9c3ae4f474d3eace4762e9e76
parent9439ab07a553bd0cd1460ac9d17abb223171793f (diff)
feat: add a link to action menu (commnt and like button) after RSS body
-rw-r--r--i18n/en.yml1
-rw-r--r--i18n/zh.yml1
-rw-r--r--layouts/rss.xml5
3 files changed, 6 insertions, 1 deletions
diff --git a/i18n/en.yml b/i18n/en.yml
index a303a633..17a12af8 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -56,3 +56,4 @@ actionMenu:
comment: Comment
like: Sacrifice your heart
liked: You've already made your sacrifice
+rss_comment_link: "Come and leave a comment"
diff --git a/i18n/zh.yml b/i18n/zh.yml
index 78d3bcf2..3ec0151b 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -55,3 +55,4 @@ actionMenu:
comment: 评论
like: 为这篇文章献上心脏
liked: 你已经献上心脏了
+rss_comment_link: "读完啦?来坐坐吧"
diff --git a/layouts/rss.xml b/layouts/rss.xml
index e8d581fc..026d9a87 100644
--- a/layouts/rss.xml
+++ b/layouts/rss.xml
@@ -53,7 +53,10 @@
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
- <description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
+ <description>
+ {{ .Content | transform.XMLEscape | safeHTML }}
+ {{ printf `<div style="text-align:right;"><a href="%s#action-menu">%s</a></div>` .Permalink (T "rss_comment_link") | transform.XMLEscape | safeHTML }}
+ </description>
</item>
{{- end }}
</channel>