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

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-01-15 07:05:13 +0300
committerAnthony Fok <foka@debian.org>2015-01-15 07:05:13 +0300
commit9150a98f3ed0f9b7732e80eb181194532bc2e189 (patch)
treec4a84c03e7cbb160db2a4ccd8a1d0aac1f30c2d9 /tpl
parent208086ebff1579600459fdf8653c787e568fb1a7 (diff)
Replace `if` with `with` in embedded rss.xml
... resulting in a slightly more compact template.
Diffstat (limited to 'tpl')
-rw-r--r--tpl/template_embedded.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/template_embedded.go b/tpl/template_embedded.go
index 74fefb592..6f089aefe 100644
--- a/tpl/template_embedded.go
+++ b/tpl/template_embedded.go
@@ -52,8 +52,8 @@ func (t *GoHtmlTemplate) EmbedTemplates() {
<description>Recent content {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
- {{ if .Site.Author.email }}<managingEditor>{{.Site.Author.email}}{{ with .Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
- {{ if .Site.Author.email }}<webMaster>{{.Site.Author.email}}{{ with .Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
+ {{ with .Site.Author.email }}<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
+ {{ with .Site.Author.email }}<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05" }} {{ with .Date.Format "MST" }}{{ if eq . "UTC" }}UT{{else}}{{.}}{{end}}{{end}}</lastBuildDate>
<atom:link href="{{.Url}}" rel="self" type="application/rss+xml" />
@@ -62,7 +62,7 @@ func (t *GoHtmlTemplate) EmbedTemplates() {
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05" }} {{ with .Date.Format "MST" }}{{ if eq . "UTC" }}UT{{else}}{{.}}{{end}}{{end}}</pubDate>
- {{ if .Site.Author.email }}<author>{{.Site.Author.email}}{{ with .Site.Author.name }} ({{.}}){{end}}</author>{{end}}
+ {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>