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

github.com/de-souza/hugo-flex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorde-souza <43355143+de-souza@users.noreply.github.com>2019-08-26 14:09:45 +0300
committerde-souza <43355143+de-souza@users.noreply.github.com>2019-08-26 14:09:45 +0300
commit56c53a763ad0d846bae13469b10d973f7d9498cd (patch)
treec711264cd0b0c91ff9c11da6e6ba4e23c90f9599
parent118aa53c920206e2776ee9487e8f9b9bb4ffcce1 (diff)
Use with function instead of creating a variable
-rw-r--r--layouts/_default/rss.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 7f86dee..cab6895 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,6 +1,7 @@
-{{ $baseXML := resources.Get "xml/base.temp.xml" | resources.ExecuteAsTemplate "xml/base.xml" . -}}
{{ `<?xml version="1.0" encoding="utf-8" standalone="yes" ?>` | safeHTML }}
-{{ printf `<?xml-stylesheet type="text/xsl" href=%q ?>` $baseXML.Permalink | safeHTML }}
+{{ with resources.Get "xml/base.temp.xml" | resources.ExecuteAsTemplate "xml/base.xml" . | minify -}}
+{{ printf `<?xml-stylesheet type="text/xsl" href=%q ?>` .Permalink | safeHTML }}
+{{ end -}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>