mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Add relation tags for syndication
This commit is contained in:
parent
111f2e7a53
commit
7b195b80c8
1 changed files with 10 additions and 8 deletions
|
@ -10,7 +10,7 @@
|
|||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
{{- printf "<?xml-stylesheet href=\"/rss.xsl\" type=\"text/xsl\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink | absURL }}</link>
|
||||
|
@ -30,20 +30,22 @@
|
|||
<link>{{ .Permalink | absURL }}</link>
|
||||
{{ if .Page.Params.Audio }}<enclosure url="{{ .Permalink | absURL }}{{ .Page.Params.Audio }}" length="{{ (os.Stat (path.Join .File.Dir .Page.Params.Audio)).Size }}" type="audio/mpeg" />{{end}}
|
||||
<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>{{ .Permalink | absURL }}</guid>
|
||||
<description>
|
||||
{{- with index .Params.Media 0 }}
|
||||
<img src="{{ path.Join $page.RelPermalink . | absURL }}" />
|
||||
{{ end -}}
|
||||
{{- .Summary -}}
|
||||
<img src="{{ path.Join $page.RelPermalink . | absURL }}" />
|
||||
{{- end }}
|
||||
{{ .Summary | html }}
|
||||
</description>
|
||||
<content:encoded>
|
||||
{{- range $i, $src := .Params.Media }}
|
||||
<img src="{{ path.Join $page.RelPermalink $src | absURL }}" />
|
||||
{{ end -}}
|
||||
{{- .Content | html -}}
|
||||
<img src="{{ path.Join $page.RelPermalink $src | absURL }}" /><br/>
|
||||
{{- end }}
|
||||
{{ .Content | html }}
|
||||
</content:encoded>
|
||||
{{- range .Params.syndications}}
|
||||
<dc:relation>{{ . }}</dc:relation>
|
||||
{{- end }}
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
|
|
Loading…
Reference in a new issue