]> njoseph.me Git - hyde.git/commitdiff
Fix RSS feeds master
authorJoseph Nuthalapati <njoseph@riseup.net>
Mon, 28 Mar 2022 07:50:22 +0000 (13:20 +0530)
committerJoseph Nuthalapati <njoseph@riseup.net>
Mon, 28 Mar 2022 07:50:22 +0000 (13:20 +0530)
Fixed the configuration according to this blog post
https://davidbuck.net/post/setup-hugo-to-output-only-an-rss-feed-of-blog-posts/

layouts/partials/head.html
layouts/rss.xml

index 30ff316bc13323712dbe208c82ea99c4f9c5b212..1b132aeb5e895f923bfe2f67eef9117eb34671d3 100644 (file)
@@ -26,9 +26,7 @@
   <link rel="shortcut icon" href="/favicon.png">
 
   <!-- RSS etc -->
-  {{ range .AlternativeOutputFormats -}}
-    {{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
-  {{ end -}}
+  <link rel="alternate" type="application/rss+xml" href='{{ "feed.xml" | absURL }}' />
 
   {{ partial "hook_head_end.html" . }}
 </head>
index 50de51c789ae6c2df94d34513b7929d532e71286..08b6f554992ce20cc80e5c553874c9caa21cf629 100644 (file)
@@ -13,7 +13,7 @@
     {{ with .OutputFormats.Get "RSS" }}
     {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
     {{ end }}
-    {{ range .Pages }}
+    {{ range where .Site.RegularPages "Section" "posts" }}
     <item>
       <title>{{ .Title }}</title>
       <link>{{ .Permalink }}</link>