feat: add social link for RSS and some configs (#250)
This commit is contained in:
@@ -82,7 +82,7 @@ I hope you will LoveIt ❤️!
|
|||||||
|
|
||||||
* **Gravatar** supported by [Gravatar](https://gravatar.com)
|
* **Gravatar** supported by [Gravatar](https://gravatar.com)
|
||||||
* Local **Avatar** supported
|
* Local **Avatar** supported
|
||||||
* Up to **61** social links supported
|
* Up to **62** social links supported
|
||||||
* Up to **28** share sites supported
|
* Up to **28** share sites supported
|
||||||
* **Disqus** comment system supported by [Disqus](https://disqus.com)
|
* **Disqus** comment system supported by [Disqus](https://disqus.com)
|
||||||
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
* 支持 **[Gravatar](https://gravatar.com)** 头像
|
* 支持 **[Gravatar](https://gravatar.com)** 头像
|
||||||
* 支持本地**头像**
|
* 支持本地**头像**
|
||||||
* 支持多达 **61** 种社交链接
|
* 支持多达 **62** 种社交链接
|
||||||
* 支持多达 **28** 种网站分享
|
* 支持多达 **28** 种网站分享
|
||||||
* 支持 **[Disqus](https://disqus.com)** 评论系统
|
* 支持 **[Disqus](https://disqus.com)** 评论系统
|
||||||
* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
|
* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ enableEmoji = true
|
|||||||
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
||||||
# Home page config
|
# Home page config
|
||||||
[languages.en.params.home]
|
[languages.en.params.home]
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
# Home page profile
|
# Home page profile
|
||||||
[languages.en.params.home.profile]
|
[languages.en.params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -190,6 +192,7 @@ enableEmoji = true
|
|||||||
# XMPP = "xxxx"
|
# XMPP = "xxxx"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
# Bilibili = "xxxx"
|
# Bilibili = "xxxx"
|
||||||
|
RSS = true
|
||||||
|
|
||||||
[languages.zh-cn]
|
[languages.zh-cn]
|
||||||
weight = 2
|
weight = 2
|
||||||
@@ -269,6 +272,8 @@ enableEmoji = true
|
|||||||
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
||||||
# 主页信息设置
|
# 主页信息设置
|
||||||
[languages.zh-cn.params.home]
|
[languages.zh-cn.params.home]
|
||||||
|
# RSS 文章数目
|
||||||
|
rss = 10
|
||||||
# 主页个人信息
|
# 主页个人信息
|
||||||
[languages.zh-cn.params.home.profile]
|
[languages.zh-cn.params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -355,6 +360,7 @@ enableEmoji = true
|
|||||||
# XMPP = "xxxx@example.com"
|
# XMPP = "xxxx@example.com"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
Bilibili = "xxxx"
|
Bilibili = "xxxx"
|
||||||
|
RSS = true
|
||||||
|
|
||||||
[languages.fr]
|
[languages.fr]
|
||||||
weight = 3
|
weight = 3
|
||||||
@@ -434,6 +440,8 @@ enableEmoji = true
|
|||||||
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
|
||||||
# Home page config
|
# Home page config
|
||||||
[languages.fr.params.home]
|
[languages.fr.params.home]
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
# Home page profile
|
# Home page profile
|
||||||
[languages.fr.params.home.profile]
|
[languages.fr.params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -520,6 +528,7 @@ enableEmoji = true
|
|||||||
# XMPP = "xxxx"
|
# XMPP = "xxxx"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
# Bilibili = "xxxx"
|
# Bilibili = "xxxx"
|
||||||
|
RSS = true
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
# LoveIt theme version
|
# LoveIt theme version
|
||||||
@@ -583,6 +592,9 @@ enableEmoji = true
|
|||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
# 日期格式 (月和日)
|
# 日期格式 (月和日)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
# RSS 文章数目
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# List (category or tag) page config
|
# List (category or tag) page config
|
||||||
# List (目录或标签) 页面配置
|
# List (目录或标签) 页面配置
|
||||||
@@ -593,6 +605,9 @@ enableEmoji = true
|
|||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
# 日期格式 (月和日)
|
# 日期格式 (月和日)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
# RSS 文章数目
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# Page config
|
# Page config
|
||||||
# 文章页面配置
|
# 文章页面配置
|
||||||
@@ -903,6 +918,7 @@ enableEmoji = true
|
|||||||
# 作者配置
|
# 作者配置
|
||||||
[author]
|
[author]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
|
email = ""
|
||||||
link = ""
|
link = ""
|
||||||
|
|
||||||
# Sitemap config
|
# Sitemap config
|
||||||
|
|||||||
@@ -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)
|
* :(far fa-user): **Gravatar** supported by [Gravatar](https://gravatar.com)
|
||||||
* :(fas fa-user-circle): Local **Avatar** supported
|
* :(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
|
* :(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): **Disqus** comment system supported by [Disqus](https://disqus.com)
|
||||||
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
||||||
|
|||||||
@@ -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)
|
* :(far fa-user): **Gravatar** supported by [Gravatar](https://gravatar.com)
|
||||||
* :(fas fa-user-circle): Local **Avatar** supported
|
* :(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
|
* :(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): **Disqus** comment system supported by [Disqus](https://disqus.com)
|
||||||
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
* :(far fa-comment-dots): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ lightgallery: true
|
|||||||
|
|
||||||
* :(far fa-user): 支持 **[Gravatar](https://gravatar.com)** 头像
|
* :(far fa-user): 支持 **[Gravatar](https://gravatar.com)** 头像
|
||||||
* :(fas fa-user-circle): 支持本地**头像**
|
* :(fas fa-user-circle): 支持本地**头像**
|
||||||
* :(far fa-id-card): 支持多达 **61** 种社交链接
|
* :(far fa-id-card): 支持多达 **62** 种社交链接
|
||||||
* :(fas fa-share-square): 支持多达 **28** 种网站分享
|
* :(fas fa-share-square): 支持多达 **28** 种网站分享
|
||||||
* :(far fa-comment): 支持 **[Disqus](https://disqus.com)** 评论系统
|
* :(far fa-comment): 支持 **[Disqus](https://disqus.com)** 评论系统
|
||||||
* :(far fa-comment-dots): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
|
* :(far fa-comment-dots): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
|
||||||
|
|||||||
@@ -244,6 +244,8 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# {{< version 0.2.0 >}} List (category or tag) page config
|
# {{< version 0.2.0 >}} List (category or tag) page config
|
||||||
[params.list]
|
[params.list]
|
||||||
@@ -251,9 +253,13 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# Home page config
|
# Home page config
|
||||||
[params.home]
|
[params.home]
|
||||||
|
# {{< version 0.2.0 >}} amount of RSS pages
|
||||||
|
rss = 10
|
||||||
# Home page profile
|
# Home page profile
|
||||||
[params.home.profile]
|
[params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -343,6 +349,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
# XMPP = "xxxx"
|
# XMPP = "xxxx"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
# Bilibili = "xxxx"
|
# Bilibili = "xxxx"
|
||||||
|
RSS = true # {{< version 0.2.0 >}}
|
||||||
|
|
||||||
# {{< version 0.2.0 changed >}} Page config
|
# {{< version 0.2.0 changed >}} Page config
|
||||||
[params.page]
|
[params.page]
|
||||||
@@ -606,6 +613,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
# Author config
|
# Author config
|
||||||
[author]
|
[author]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
|
email = ""
|
||||||
link = ""
|
link = ""
|
||||||
|
|
||||||
# Sitemap config
|
# Sitemap config
|
||||||
|
|||||||
@@ -249,6 +249,8 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# {{< version 0.2.0 >}} List (category or tag) page config
|
# {{< version 0.2.0 >}} List (category or tag) page config
|
||||||
[params.list]
|
[params.list]
|
||||||
@@ -256,9 +258,13 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# date format (month and day)
|
# date format (month and day)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# amount of RSS pages
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# Home page config
|
# Home page config
|
||||||
[params.home]
|
[params.home]
|
||||||
|
# {{< version 0.2.0 >}} amount of RSS pages
|
||||||
|
rss = 10
|
||||||
# Home page profile
|
# Home page profile
|
||||||
[params.home.profile]
|
[params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -348,6 +354,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
# XMPP = "xxxx"
|
# XMPP = "xxxx"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
# Bilibili = "xxxx"
|
# Bilibili = "xxxx"
|
||||||
|
RSS = true # {{< version 0.2.0 >}}
|
||||||
|
|
||||||
# {{< version 0.2.0 changed >}} Page config
|
# {{< version 0.2.0 changed >}} Page config
|
||||||
[params.page]
|
[params.page]
|
||||||
@@ -611,6 +618,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
# Author config
|
# Author config
|
||||||
[author]
|
[author]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
|
email = ""
|
||||||
link = ""
|
link = ""
|
||||||
|
|
||||||
# Sitemap config
|
# Sitemap config
|
||||||
|
|||||||
@@ -247,6 +247,8 @@ hugo
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# 日期格式 (月和日)
|
# 日期格式 (月和日)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# RSS 文章数目
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# {{< version 0.2.0 >}} List (目录或标签) 页面配置
|
# {{< version 0.2.0 >}} List (目录或标签) 页面配置
|
||||||
[params.list]
|
[params.list]
|
||||||
@@ -254,9 +256,13 @@ hugo
|
|||||||
paginate = 20
|
paginate = 20
|
||||||
# 日期格式 (月和日)
|
# 日期格式 (月和日)
|
||||||
dateFormat = "01-02"
|
dateFormat = "01-02"
|
||||||
|
# RSS 文章数目
|
||||||
|
rss = 10
|
||||||
|
|
||||||
# 主页配置
|
# 主页配置
|
||||||
[params.home]
|
[params.home]
|
||||||
|
# {{< version 0.2.0 >}} RSS 文章数目
|
||||||
|
rss = 10
|
||||||
# 主页个人信息
|
# 主页个人信息
|
||||||
[params.home.profile]
|
[params.home.profile]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -346,6 +352,7 @@ hugo
|
|||||||
# XMPP = "xxxx"
|
# XMPP = "xxxx"
|
||||||
# Matrix = "xxxx"
|
# Matrix = "xxxx"
|
||||||
Bilibili = "xxxx"
|
Bilibili = "xxxx"
|
||||||
|
RSS = true # {{< version 0.2.0 >}}
|
||||||
|
|
||||||
# {{< version 0.2.0 changed >}} 文章页面配置
|
# {{< version 0.2.0 changed >}} 文章页面配置
|
||||||
[params.page]
|
[params.page]
|
||||||
@@ -609,6 +616,7 @@ hugo
|
|||||||
# 作者配置
|
# 作者配置
|
||||||
[author]
|
[author]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
|
email = ""
|
||||||
link = ""
|
link = ""
|
||||||
|
|
||||||
# 网站地图配置
|
# 网站地图配置
|
||||||
|
|||||||
@@ -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>
|
<channel>
|
||||||
<title>
|
<title>
|
||||||
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
|
{{- .Site.Title -}}
|
||||||
</title>
|
</title>
|
||||||
<link>
|
<link>
|
||||||
{{- .Permalink -}}
|
{{- .Permalink -}}
|
||||||
</link>
|
</link>
|
||||||
<description>
|
<description>
|
||||||
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
|
{{- .Site.Params.description | default .Site.Title -}}
|
||||||
</description>
|
</description>
|
||||||
<generator>Hugo -- gohugo.io</generator>
|
<generator>Hugo -- gohugo.io</generator>
|
||||||
{{- with .Site.LanguageCode -}}
|
{{- with .Site.LanguageCode -}}
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Author.email -}}
|
{{- with .Site.Author.email -}}
|
||||||
<managingEditor>
|
<managingEditor>
|
||||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
{{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
|
||||||
</managingEditor>
|
</managingEditor>
|
||||||
<webMaster>
|
<webMaster>
|
||||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
{{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
|
||||||
</webMaster>
|
</webMaster>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Copyright -}}
|
{{- with .Site.Copyright -}}
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||||
</lastBuildDate>
|
</lastBuildDate>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
|
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
|
||||||
{{- range first 15 (where .Data.Pages "Type" "!=" "home") -}}
|
{{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
|
||||||
<item>
|
<item>
|
||||||
<title>
|
<title>
|
||||||
{{- .Title -}}
|
{{- .Title -}}
|
||||||
@@ -45,16 +45,18 @@
|
|||||||
<pubDate>
|
<pubDate>
|
||||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||||
</pubDate>
|
</pubDate>
|
||||||
{{- with .Site.Author.email -}}
|
<author>
|
||||||
<author>
|
{{- .Params.author | default $.Site.Author.name | default (T "author") -}}
|
||||||
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
|
</author>
|
||||||
</author>
|
|
||||||
{{- end -}}
|
|
||||||
<guid>
|
<guid>
|
||||||
{{- .Permalink -}}
|
{{- .Permalink -}}
|
||||||
</guid>
|
</guid>
|
||||||
<description>
|
<description>
|
||||||
{{- .Content | html -}}
|
{{- with .Summary -}}
|
||||||
|
{{- dict "content" . "ruby" true "fraction" true "fontawesome" true | partial "function/content.html" | plainify -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Description | plainify -}}
|
||||||
|
{{- end -}}
|
||||||
</description>
|
</description>
|
||||||
</item>
|
</item>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -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>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{{- $rel := "" -}}
|
{{- $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 -}}
|
{{- with .icon -}}
|
||||||
{{- partial "plugin/icon.html" . -}}
|
{{- partial "plugin/icon.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $src := .source -}}
|
{{- $src := .source -}}
|
||||||
{{- $integrity := .integrity -}}
|
{{- $integrity := .integrity -}}
|
||||||
{{- if strings.HasPrefix $src "http" | or (strings.HasPrefix $src "//") | not -}}
|
{{- if (urls.Parse $src).Host | not -}}
|
||||||
{{- $res := resources.Get $src -}}
|
{{- $res := resources.Get $src -}}
|
||||||
{{- with .template -}}
|
{{- with .template -}}
|
||||||
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
||||||
|
|||||||
@@ -427,6 +427,13 @@
|
|||||||
{{- partial "plugin/link.html" $options -}}
|
{{- partial "plugin/link.html" $options -}}
|
||||||
{{- end -}}
|
{{- 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 */ -}}
|
{{- /* Custom */ -}}
|
||||||
{{- with .social.Custom -}}
|
{{- with .social.Custom -}}
|
||||||
{{- . | safeHTML -}}
|
{{- . | safeHTML -}}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $href := .source -}}
|
{{- $href := .source -}}
|
||||||
{{- $integrity := .integrity -}}
|
{{- $integrity := .integrity -}}
|
||||||
{{- if strings.HasPrefix $href "http" | not -}}
|
{{- if (urls.Parse $href).Host | not -}}
|
||||||
{{- $res := resources.Get $href -}}
|
{{- $res := resources.Get $href -}}
|
||||||
{{- with .template -}}
|
{{- with .template -}}
|
||||||
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
||||||
|
|||||||
64
layouts/posts/rss.xml
Normal file
64
layouts/posts/rss.xml
Normal file
@@ -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>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
|
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
|
||||||
></meting-js>
|
></meting-js>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else if strings.HasSuffix (.Get 0) "http" -}}
|
{{- else if (.Get 0 | urls.Parse).Host -}}
|
||||||
<meting-js auto="{{ .Get 0 }}" theme="{{ $theme }}"></meting-js>
|
<meting-js auto="{{ .Get 0 }}" theme="{{ $theme }}"></meting-js>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
|
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
|
||||||
|
|||||||
64
layouts/taxonomy/rss.xml
Normal file
64
layouts/taxonomy/rss.xml
Normal file
@@ -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>
|
||||||
Reference in New Issue
Block a user