blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git
commit 538b439f0c3aedc1b2a8c27a34e81c03344928c1
parent e79db1c26eaef4d4eb4f715d2d916b0d41616760
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat,  4 Apr 2020 20:14:01 -0500

Limit the number of posts in rss feed

Diffstat:
Mlayouts/rss.xml | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layouts/rss.xml b/layouts/rss.xml
@@ -5,7 +5,7 @@
   <updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}</updated>
   <author><name>{{ .Site.Author.name }}</name></author>
   <id>{{ .Permalink }}</id>
-  {{ range where .Site.RegularPages "Section" "!=" "" }}
+  {{ range (first 20 (where .Site.RegularPages "Section" "!=" "")) }}
   <entry>
     <id>{{ .Permalink }}</id>
     {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>