Browse Source

RSS items limit to 10

Track3 6 years ago
parent
commit
a101899f3e
2 changed files with 2 additions and 1 deletions
  1. 1 0
      config.toml
  2. 1 1
      layouts/posts/rss.xml

+ 1 - 0
config.toml

@@ -8,6 +8,7 @@ enableGitInfo = true
 pygmentsCodefences  = true
 pygmentsUseClasses  = true
 hasCJKLanguage = true
+rssLimit = 10
 
 [blackfriday]
   hrefTargetBlank = true

+ 1 - 1
layouts/posts/rss.xml

@@ -12,7 +12,7 @@
     {{ with .OutputFormats.Get "RSS" -}}
         {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
     {{ end -}}
-    {{ range .Data.Pages }}
+    {{ range .Pages }}
     <item>
       <title>{{ .Title }}</title>
       <link>{{ .Permalink }}</link>