mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-11 03:25:33 +01:00
Add context about events in RSS feed
This commit is contained in:
parent
d4a9346577
commit
6cf051f69a
1 changed files with 11 additions and 9 deletions
|
@ -24,7 +24,8 @@
|
||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" (.Permalink | absURL) .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" (.Permalink | absURL) .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range $i, $page := $pages }}
|
{{- range $i, $page := $pages -}}
|
||||||
|
{{- if .params.inReplyTo -}}{{ continue }}{{- end -}}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ .Title | default (delimit (slice "An untitled" (.Date.Format "January") (.Type | singularize)) " ") }}</title>
|
<title>{{ .Title | default (delimit (slice "An untitled" (.Date.Format "January") (.Type | singularize)) " ") }}</title>
|
||||||
<link>{{ .Permalink | absURL }}</link>
|
<link>{{ .Permalink | absURL }}</link>
|
||||||
|
@ -32,12 +33,13 @@
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
<guid>{{ .Permalink | absURL }}</guid>
|
<guid>{{ .Permalink | absURL }}</guid>
|
||||||
<description>
|
<description>
|
||||||
{{ if .Params.bookmarkOf }}
|
{{- if .Params.bookmarkOf -}}
|
||||||
{{- $reference := partial "reference.obj" (dict "url" .Params.bookmarkOf "page" .) -}}
|
{{- $reference := partial "reference.obj" (dict "url" .Params.bookmarkOf "page" .) -}}
|
||||||
Thoughts on a bookmarked article{{ with $reference.name }}: {{.}}{{ end }}.
|
Thoughts on a bookmarked article{{ with $reference.name }}: {{.}}{{ end }}.
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
{{ index (split .Summary "\n") 0 }}
|
{{- if eq .Section "calendar" -}}(An event I may be going to.) {{ end -}}
|
||||||
{{ end }}
|
{{- index (split .Summary "\n") 0 -}}
|
||||||
|
{{- end -}}
|
||||||
</description>
|
</description>
|
||||||
<content:encoded>
|
<content:encoded>
|
||||||
{{- range $i, $src := .Params.Media }}
|
{{- range $i, $src := .Params.Media }}
|
||||||
|
@ -52,15 +54,15 @@
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ if $timing }}
|
{{ if $timing }}
|
||||||
<p style="font-style:italic;font-size:small">I'm planning on going to this event on
|
<p><i><small>I'm planning on going to this event on
|
||||||
{{ partial "year-relative-date.txt" (time.AsTime $timing.starts) }}.
|
{{ partial "year-relative-date.txt" (time.AsTime $timing.starts) }}.
|
||||||
See the bottom of <a href="{{ .Permalink | absURL }}#post-info">the post</a> for more information, and get in touch if you'd like to go together!</p>
|
See the bottom of <a href="{{ .Permalink | absURL }}#post-info">the post</a> for more information, and get in touch if you'd like to go together!</small></i></p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ if .Params.bookmarkOf }}
|
{{ if .Params.bookmarkOf }}
|
||||||
<p><i>{{ partial "bookmark-of.html" . | html }}</i></p>
|
<p><i><small>{{ partial "bookmark-of.html" . | html }}</small></i></p>
|
||||||
{{ else if .Params.inReplyTo }}
|
{{ else if .Params.inReplyTo }}
|
||||||
<p><i>{{ partial "in-reply-to.html" . | html }}</i></p>
|
<p><i><small>{{ partial "in-reply-to.html" . | html }}</small></i></p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ .Content | html }}
|
{{ .Content | html }}
|
||||||
</content:encoded>
|
</content:encoded>
|
||||||
|
|
Loading…
Reference in a new issue