commit d9f67e5e1d5253d4acacefc0993aecea5ccb89a5 parent 514f73995908ab1849053e94576284b4758e200e Author: Yohanes Bandung <bandungpenting@gmail.com> Date: Fri, 1 May 2020 23:00:06 +0700 hotfix: notes rss Diffstat:
| M | layouts/index.rss.xml | | | 4 | +++- |
| M | layouts/notes/rss.xml | | | 6 | +++--- |
| M | layouts/partials/footer/footer.html | | | 2 | +- |
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/layouts/index.rss.xml b/layouts/index.rss.xml @@ -3,7 +3,9 @@ {{ $pctx = .Site }} {{- end -}} {{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} +{{- if or $.IsHome -}} + {{- $pages = (where $pctx.RegularPages "Section" "posts") }} +{{- else if $.IsSection -}} {{- $pages = $pctx.RegularPages -}} {{- else -}} {{- $pages = $pctx.Pages -}} diff --git a/layouts/notes/rss.xml b/layouts/notes/rss.xml @@ -15,7 +15,7 @@ {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> - <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> + <title>YBBond Notes</title> <link>{{ .Permalink }}</link> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} @@ -32,10 +32,10 @@ {{ range $pages }} <item> <title>{{ .Title }}</title> - <link>{{ .Site.BaseURL }}notes/#{{ $idslug }}</link> + <link>{{ .Site.BaseURL }}notes#{{ $idslug }}</link> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} - <guid>{{ .Site.BaseURL }}notes/#{{ $idslug }}</guid> + <guid isPermaLink="true">{{ .Site.BaseURL }}notes#{{ $idslug }}</guid> <description>{{ .Content | html }}</description> </item> {{ end }} diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html @@ -12,7 +12,7 @@ <a class="button" href="https://twitter.com/{{ .Site.Params.Twitter }}" rel="me">Twitter</a> <a class="button" href="https://micro.blog/{{ .Site.Params.Microblog }}" rel="me">Micro.blog</a> <a class="button" href="https://indieweb.social/@ybbond" rel="me">Mastodon</a> - <a class="button" href={{ "posts/index.xml" | absURL }}>RSS</a> + <a class="button" href={{ "index.xml" | absURL }}>RSS</a> </p> </div> <p class="footer__copyright">