Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(rss): fixed wrong author value
Browse files Browse the repository at this point in the history
re #116
  • Loading branch information
victor-pogor committed Mar 29, 2021
1 parent a8ada22 commit 8d5b0dc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseURL = "https://example.com"
baseURL = "https://codeit.suntprogramator.dev"
# [en, zh-cn, fr, pl, ...] determines default content language
defaultContentLanguage = "en"
# theme
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.rss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>
{{- .Site.Title -}}
Expand Down
15 changes: 11 additions & 4 deletions layouts/partials/rss/item.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name) -}}
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name "email" .Site.Author.email) -}}
<item>
<title>
{{- .Page.Title -}}
Expand All @@ -9,9 +9,16 @@
<pubDate>
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</pubDate>
<author>
{{- .params.author | default (T "author") -}}
</author>
{{- with $params.email -}}
<author>
{{- $params.email -}}
</author>
{{- end -}}
{{- with $params.author -}}
<dc:creator>
{{- $params.author -}}
</dc:creator>
{{- end -}}
<guid>
{{- .Page.Permalink -}}
</guid>
Expand Down
2 changes: 1 addition & 1 deletion layouts/posts/rss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/taxonomy/rss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>
{{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}}
Expand Down

0 comments on commit 8d5b0dc

Please sign in to comment.