Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-04-22 18:58:40 +0300
committerGitHub <noreply@github.com>2020-04-22 18:58:40 +0300
commit07b669c826f9250e6593e880f80c63bf70f5a746 (patch)
tree2493616f0f9380ec01b115ee093653aeff6a2ded
parentf5fb31ec43e59765feb0b214895d3cee1039d02a (diff)
feat: add social link for RSS and some configs (#250)
-rw-r--r--README.md2
-rw-r--r--README.zh-cn.md2
-rw-r--r--exampleSite/config.toml16
-rw-r--r--exampleSite/content/about.en.md2
-rw-r--r--exampleSite/content/about.fr.md2
-rw-r--r--exampleSite/content/about.zh-cn.md2
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.en.md8
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.fr.md8
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.zh-cn.md8
-rw-r--r--layouts/inde.rss.xml (renamed from layouts/rss.xml)28
-rw-r--r--layouts/index.atom.xml45
-rw-r--r--layouts/partials/plugin/link.html2
-rw-r--r--layouts/partials/plugin/script.html2
-rw-r--r--layouts/partials/plugin/social.html7
-rw-r--r--layouts/partials/plugin/stylesheet.html2
-rw-r--r--layouts/posts/rss.xml64
-rw-r--r--layouts/shortcodes/music.html2
-rw-r--r--layouts/taxonomy/rss.xml64
18 files changed, 199 insertions, 67 deletions
diff --git a/README.md b/README.md
index 9344640..d4f9478 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ I hope you will LoveIt ❤️!
* **Gravatar** supported by [Gravatar](https://gravatar.com)
* Local **Avatar** supported
-* Up to **61** social links supported
+* Up to **62** social links supported
* Up to **28** share sites supported
* **Disqus** comment system supported by [Disqus](https://disqus.com)
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
diff --git a/README.zh-cn.md b/README.zh-cn.md
index 4c9c14b..a1b295a 100644
--- a/README.zh-cn.md
+++ b/README.zh-cn.md
@@ -77,7 +77,7 @@
* 支持 **[Gravatar](https://gravatar.com)** 头像
* 支持本地**头像**
-* 支持多达 **61** 种社交链接
+* 支持多达 **62** 种社交链接
* 支持多达 **28** 种网站分享
* 支持 **[Disqus](https://disqus.com)** 评论系统
* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index a0d90da..9347d29 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -104,6 +104,8 @@ enableEmoji = true
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
# Home page config
[languages.en.params.home]
+ # amount of RSS pages
+ rss = 10
# Home page profile
[languages.en.params.home.profile]
enable = true
@@ -190,6 +192,7 @@ enableEmoji = true
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
+ RSS = true
[languages.zh-cn]
weight = 2
@@ -269,6 +272,8 @@ enableEmoji = true
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
# 主页信息设置
[languages.zh-cn.params.home]
+ # RSS 文章数目
+ rss = 10
# 主页个人信息
[languages.zh-cn.params.home.profile]
enable = true
@@ -355,6 +360,7 @@ enableEmoji = true
# XMPP = "xxxx@example.com"
# Matrix = "xxxx"
Bilibili = "xxxx"
+ RSS = true
[languages.fr]
weight = 3
@@ -434,6 +440,8 @@ enableEmoji = true
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
# Home page config
[languages.fr.params.home]
+ # amount of RSS pages
+ rss = 10
# Home page profile
[languages.fr.params.home.profile]
enable = true
@@ -520,6 +528,7 @@ enableEmoji = true
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
+ RSS = true
[params]
# LoveIt theme version
@@ -583,6 +592,9 @@ enableEmoji = true
# date format (month and day)
# 日期格式 (月和日)
dateFormat = "01-02"
+ # amount of RSS pages
+ # RSS 文章数目
+ rss = 10
# List (category or tag) page config
# List (目录或标签) 页面配置
@@ -593,6 +605,9 @@ enableEmoji = true
# date format (month and day)
# 日期格式 (月和日)
dateFormat = "01-02"
+ # amount of RSS pages
+ # RSS 文章数目
+ rss = 10
# Page config
# 文章页面配置
@@ -903,6 +918,7 @@ enableEmoji = true
# 作者配置
[author]
name = "xxxx"
+ email = ""
link = ""
# Sitemap config
diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md
index cddee8f..2967154 100644
--- a/exampleSite/content/about.en.md
+++ b/exampleSite/content/about.en.md
@@ -46,7 +46,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
* :(far fa-user): **Gravatar** supported by [Gravatar](https://gravatar.com)
* :(fas fa-user-circle): Local **Avatar** supported
-* :(far fa-id-card): Up to **61** social links supported
+* :(far fa-id-card): Up to **62** social links supported
* :(fas fa-share-square): Up to **28** share sites supported
* :(far fa-comment): **Disqus** comment system supported by [Disqus](https://disqus.com)
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md
index eb07386..5e55027 100644
--- a/exampleSite/content/about.fr.md
+++ b/exampleSite/content/about.fr.md
@@ -51,7 +51,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
* :(far fa-user): **Gravatar** supported by [Gravatar](https://gravatar.com)
* :(fas fa-user-circle): Local **Avatar** supported
-* :(far fa-id-card): Up to **61** social links supported
+* :(far fa-id-card): Up to **62** social links supported
* :(fas fa-share-square): Up to **28** share sites supported
* :(far fa-comment): **Disqus** comment system supported by [Disqus](https://disqus.com)
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md
index a18555c..e2cf691 100644
--- a/exampleSite/content/about.zh-cn.md
+++ b/exampleSite/content/about.zh-cn.md
@@ -46,7 +46,7 @@ lightgallery: true
* :(far fa-user): 支持 **[Gravatar](https://gravatar.com)** 头像
* :(fas fa-user-circle): 支持本地**头像**
-* :(far fa-id-card): 支持多达 **61** 种社交链接
+* :(far fa-id-card): 支持多达 **62** 种社交链接
* :(fas fa-share-square): 支持多达 **28** 种网站分享
* :(far fa-comment): 支持 **[Disqus](https://disqus.com)** 评论系统
* :(far fa-comment-dots): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md
index 4dc5da5..410e485 100644
--- a/exampleSite/content/posts/theme-documentation-basics.en.md
+++ b/exampleSite/content/posts/theme-documentation-basics.en.md
@@ -244,6 +244,8 @@ Note that some of these parameters are explained in details in other sections of
paginate = 20
# date format (month and day)
dateFormat = "01-02"
+ # amount of RSS pages
+ rss = 10
# {{< version 0.2.0 >}} List (category or tag) page config
[params.list]
@@ -251,9 +253,13 @@ Note that some of these parameters are explained in details in other sections of
paginate = 20
# date format (month and day)
dateFormat = "01-02"
+ # amount of RSS pages
+ rss = 10
# Home page config
[params.home]
+ # {{< version 0.2.0 >}} amount of RSS pages
+ rss = 10
# Home page profile
[params.home.profile]
enable = true
@@ -343,6 +349,7 @@ Note that some of these parameters are explained in details in other sections of
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
+ RSS = true # {{< version 0.2.0 >}}
# {{< version 0.2.0 changed >}} Page config
[params.page]
@@ -606,6 +613,7 @@ Note that some of these parameters are explained in details in other sections of
# Author config
[author]
name = "xxxx"
+ email = ""
link = ""
# Sitemap config
diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md
index 8fcb6c4..4ce6b89 100644
--- a/exampleSite/content/posts/theme-documentation-basics.fr.md
+++ b/exampleSite/content/posts/theme-documentation-basics.fr.md
@@ -249,6 +249,8 @@ Note that some of these parameters are explained in details in other sections of
paginate = 20
# date format (month and day)
dateFormat = "01-02"
+ # amount of RSS pages
+ rss = 10
# {{< version 0.2.0 >}} List (category or tag) page config
[params.list]
@@ -256,9 +258,13 @@ Note that some of these parameters are explained in details in other sections of
paginate = 20
# date format (month and day)
dateFormat = "01-02"
+ # amount of RSS pages
+ rss = 10
# Home page config
[params.home]
+ # {{< version 0.2.0 >}} amount of RSS pages
+ rss = 10
# Home page profile
[params.home.profile]
enable = true
@@ -348,6 +354,7 @@ Note that some of these parameters are explained in details in other sections of
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
+ RSS = true # {{< version 0.2.0 >}}
# {{< version 0.2.0 changed >}} Page config
[params.page]
@@ -611,6 +618,7 @@ Note that some of these parameters are explained in details in other sections of
# Author config
[author]
name = "xxxx"
+ email = ""
link = ""
# Sitemap config
diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
index 18cbb65..17970d2 100644
--- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
@@ -247,6 +247,8 @@ hugo
paginate = 20
# 日期格式 (月和日)
dateFormat = "01-02"
+ # RSS 文章数目
+ rss = 10
# {{< version 0.2.0 >}} List (目录或标签) 页面配置
[params.list]
@@ -254,9 +256,13 @@ hugo
paginate = 20
# 日期格式 (月和日)
dateFormat = "01-02"
+ # RSS 文章数目
+ rss = 10
# 主页配置
[params.home]
+ # {{< version 0.2.0 >}} RSS 文章数目
+ rss = 10
# 主页个人信息
[params.home.profile]
enable = true
@@ -346,6 +352,7 @@ hugo
# XMPP = "xxxx"
# Matrix = "xxxx"
Bilibili = "xxxx"
+ RSS = true # {{< version 0.2.0 >}}
# {{< version 0.2.0 changed >}} 文章页面配置
[params.page]
@@ -609,6 +616,7 @@ hugo
# 作者配置
[author]
name = "xxxx"
+ email = ""
link = ""
# 网站地图配置
diff --git a/layouts/rss.xml b/layouts/inde.rss.xml
index b2aa764..263082b 100644
--- a/layouts/rss.xml
+++ b/layouts/inde.rss.xml
@@ -1,13 +1,13 @@
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>
- {{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
+ {{- .Site.Title -}}
</title>
<link>
{{- .Permalink -}}
</link>
<description>
- {{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
+ {{- .Site.Params.description | default .Site.Title -}}
</description>
<generator>Hugo -- gohugo.io</generator>
{{- with .Site.LanguageCode -}}
@@ -17,10 +17,10 @@
{{- end -}}
{{- with .Site.Author.email -}}
<managingEditor>
- {{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
</managingEditor>
<webMaster>
- {{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
</webMaster>
{{- end -}}
{{- with .Site.Copyright -}}
@@ -33,8 +33,8 @@
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</lastBuildDate>
{{- end -}}
- <atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
- {{- range first 15 (where .Data.Pages "Type" "!=" "home") -}}
+ <atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
+ {{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
<item>
<title>
{{- .Title -}}
@@ -45,16 +45,18 @@
<pubDate>
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</pubDate>
- {{- with .Site.Author.email -}}
- <author>
- {{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
- </author>
- {{- end -}}
+ <author>
+ {{- .Params.author | default $.Site.Author.name | default (T "author") -}}
+ </author>
<guid>
{{- .Permalink -}}
</guid>
<description>
- {{- .Content | html -}}
+ {{- with .Summary -}}
+ {{- dict "content" . "ruby" true "fraction" true "fontawesome" true | partial "function/content.html" | plainify -}}
+ {{- else -}}
+ {{- .Description | plainify -}}
+ {{- end -}}
</description>
</item>
{{- end -}}
diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml
deleted file mode 100644
index 6e29f96..0000000
--- a/layouts/index.atom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<feed xmlns="http://www.w3.org/2005/Atom">
- {{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
- <link href="{{ .Permalink }}index.xml" rel="self"/>
- <link href="{{ .Permalink }}"/>
- {{- if not .Date.IsZero -}}
- <updated>
- {{- .Date.Format "02-01-2006T15:04:05-07:00" -}}
- </updated>
- {{- end -}}
- <id>
- {{- .Permalink -}}
- </id>
- <author>
- {{- with .Site.Author.name -}}
- <name>{{ . }}</name>
- {{- end -}}
- {{- with .Site.Author.email -}}
- <email>{{ . }}</email>
- {{- end -}}
- </author>
- <generator>Hugo -- gohugo.io</generator>
- {{- range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) -}}
- <entry>
- <title type="html"><![CDATA[{{ .Title -}}]]></title>
- <link href="{{ .Permalink }}"/>
- <id>
- {{- .Permalink -}}
- </id>
- {{- with .Site.Author.name -}}
- <author>
- <name>
- {{- . -}}
- </name>
- </author>
- {{- end -}}
- <published>
- {{- .Date.Format "2006-01-02T15:04:05-07:00" -}}
- </published>
- <updated>
- {{- .Lastmod.Format "2006-01-02T15:04:05-07:00" -}}
- </updated>
- <content type="html"><![CDATA[{{- .Content -}}]]></content>
- </entry>
- {{- end -}}
-</feed>
diff --git a/layouts/partials/plugin/link.html b/layouts/partials/plugin/link.html
index ec9aa10..443bcf0 100644
--- a/layouts/partials/plugin/link.html
+++ b/layouts/partials/plugin/link.html
@@ -1,5 +1,5 @@
{{- $rel := "" -}}
-<a href="{{ .href }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .href "http" }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
+<a href="{{ .href }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .href).Host | or .newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
{{- with .icon -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}
diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html
index f5ba9cb..45a72ca 100644
--- a/layouts/partials/plugin/script.html
+++ b/layouts/partials/plugin/script.html
@@ -3,7 +3,7 @@
{{- else -}}
{{- $src := .source -}}
{{- $integrity := .integrity -}}
- {{- if strings.HasPrefix $src "http" | or (strings.HasPrefix $src "//") | not -}}
+ {{- if (urls.Parse $src).Host | not -}}
{{- $res := resources.Get $src -}}
{{- with .template -}}
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
diff --git a/layouts/partials/plugin/social.html b/layouts/partials/plugin/social.html
index c88a39a..6f05c35 100644
--- a/layouts/partials/plugin/social.html
+++ b/layouts/partials/plugin/social.html
@@ -427,6 +427,13 @@
{{- partial "plugin/link.html" $options -}}
{{- end -}}
+ {{- /* 062: RSS */ -}}
+ {{- if .social.rss -}}
+ {{- $options := dict "href" (relLangURL "/index.xml") "title" "RSS" "newtab" true "rel" "me" -}}
+ {{- $options = dict "icon" (dict "class" "fas fa-rss fa-fw") | merge $options -}}
+ {{- partial "plugin/link.html" $options -}}
+ {{- end -}}
+
{{- /* Custom */ -}}
{{- with .social.Custom -}}
{{- . | safeHTML -}}
diff --git a/layouts/partials/plugin/stylesheet.html b/layouts/partials/plugin/stylesheet.html
index 0a4dac3..54d057a 100644
--- a/layouts/partials/plugin/stylesheet.html
+++ b/layouts/partials/plugin/stylesheet.html
@@ -3,7 +3,7 @@
{{- else -}}
{{- $href := .source -}}
{{- $integrity := .integrity -}}
- {{- if strings.HasPrefix $href "http" | not -}}
+ {{- if (urls.Parse $href).Host | not -}}
{{- $res := resources.Get $href -}}
{{- with .template -}}
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml
new file mode 100644
index 0000000..49aba41
--- /dev/null
+++ b/layouts/posts/rss.xml
@@ -0,0 +1,64 @@
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
+ <channel>
+ <title>
+ {{- T .Section | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
+ </title>
+ <link>
+ {{- .Permalink -}}
+ </link>
+ <description>
+ {{- T .Section | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
+ </description>
+ <generator>Hugo -- gohugo.io</generator>
+ {{- with .Site.LanguageCode -}}
+ <language>
+ {{- . -}}
+ </language>
+ {{- end -}}
+ {{- with .Site.Author.email -}}
+ <managingEditor>
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+ </managingEditor>
+ <webMaster>
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+ </webMaster>
+ {{- end -}}
+ {{- with .Site.Copyright -}}
+ <copyright>
+ {{- . -}}
+ </copyright>
+ {{- end -}}
+ {{- if not .Date.IsZero -}}
+ <lastBuildDate>
+ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
+ </lastBuildDate>
+ {{- end -}}
+ <atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
+ {{- range .Pages | first (.Site.Params.section.rss | default 10) -}}
+ <item>
+ <title>
+ {{- .Title -}}
+ </title>
+ <link>
+ {{- .Permalink -}}
+ </link>
+ <pubDate>
+ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
+ </pubDate>
+ <author>
+ {{- .Params.author | default $.Site.Author.name | default (T "author") -}}
+ </author>
+ <guid>
+ {{- .Permalink -}}
+ </guid>
+ <description>
+ {{- with .Summary -}}
+ {{- dict "content" . "ruby" true "fraction" true "fontawesome" true | partial "function/content.html" | plainify -}}
+ {{- else -}}
+ {{- .Description | plainify -}}
+ {{- end -}}
+ </description>
+ </item>
+ {{- end -}}
+ </channel>
+</rss>
diff --git a/layouts/shortcodes/music.html b/layouts/shortcodes/music.html
index 0933914..b0e3ede 100644
--- a/layouts/shortcodes/music.html
+++ b/layouts/shortcodes/music.html
@@ -34,7 +34,7 @@
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
></meting-js>
{{- end -}}
-{{- else if strings.HasSuffix (.Get 0) "http" -}}
+{{- else if (.Get 0 | urls.Parse).Host -}}
<meting-js auto="{{ .Get 0 }}" theme="{{ $theme }}"></meting-js>
{{- else -}}
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
diff --git a/layouts/taxonomy/rss.xml b/layouts/taxonomy/rss.xml
new file mode 100644
index 0000000..4f9bed6
--- /dev/null
+++ b/layouts/taxonomy/rss.xml
@@ -0,0 +1,64 @@
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
+ <channel>
+ <title>
+ {{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
+ </title>
+ <link>
+ {{- .Permalink -}}
+ </link>
+ <description>
+ {{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
+ </description>
+ <generator>Hugo -- gohugo.io</generator>
+ {{- with .Site.LanguageCode -}}
+ <language>
+ {{- . -}}
+ </language>
+ {{- end -}}
+ {{- with .Site.Author.email -}}
+ <managingEditor>
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+ </managingEditor>
+ <webMaster>
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+ </webMaster>
+ {{- end -}}
+ {{- with .Site.Copyright -}}
+ <copyright>
+ {{- . -}}
+ </copyright>
+ {{- end -}}
+ {{- if not .Date.IsZero -}}
+ <lastBuildDate>
+ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
+ </lastBuildDate>
+ {{- end -}}
+ <atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
+ {{- range .Pages | first (.Site.Params.list.rss | default 10) -}}
+ <item>
+ <title>
+ {{- .Title -}}
+ </title>
+ <link>
+ {{- .Permalink -}}
+ </link>
+ <pubDate>
+ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
+ </pubDate>
+ <author>
+ {{- .Params.author | default $.Site.Author.name | default (T "author") -}}
+ </author>
+ <guid>
+ {{- .Permalink -}}
+ </guid>
+ <description>
+ {{- with .Summary -}}
+ {{- dict "content" . "ruby" true "fraction" true "fontawesome" true | partial "function/content.html" | plainify -}}
+ {{- else -}}
+ {{- .Description | plainify -}}
+ {{- end -}}
+ </description>
+ </item>
+ {{- end -}}
+ </channel>
+</rss>