Finish RSS and Atom implementations
This commit is contained in:
parent
d971696e11
commit
256eae44e9
9 changed files with 118 additions and 0 deletions
6
layouts/_default/atom_entry.atom
Normal file
6
layouts/_default/atom_entry.atom
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<entry>
|
||||
{{ partial "feeds/atom/entry_metadata.xml" . }}
|
||||
{{- if .Content -}}
|
||||
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
|
||||
{{- end -}}
|
||||
</entry>
|
||||
4
layouts/_default/rss_item.rss
Normal file
4
layouts/_default/rss_item.rss
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<item>
|
||||
{{ partial "feeds/rss/item_metadata.xml" . }}
|
||||
<description>{{ `<![CDATA[` | safeHTML }}{{ .Content }}]]></description>
|
||||
</item>
|
||||
7
layouts/_default/section.atom
Normal file
7
layouts/_default/section.atom
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{{- $page := . -}}
|
||||
{{- $pages := $page.RegularPages -}}
|
||||
{{- $limit := $.Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{ partial "feeds/atom/base.xml" (dict "context" $page "pages" $pages "limit" $limit) }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue