Skip to content

Commit

Permalink
Remove trailing whitespace and tabs from RSS templates
Browse files Browse the repository at this point in the history
The rss templates had some tab characters mixed in with the spaces.
Additionally there would end up being trailing whitespace in output
rss feeds, which looks red in git diff.
  • Loading branch information
solarkennedy authored and bep committed Aug 12, 2020
1 parent f3cb0be commit 5f42590
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
28 changes: 15 additions & 13 deletions tpl/tplimpl/embedded/templates.autogen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tpl/tplimpl/embedded/templates/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<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" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
Expand All @@ -36,4 +36,4 @@
</item>
{{ end }}
</channel>
</rss>
</rss>
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates/_default/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
/>{{ end }}
</url>
{{ end }}
</urlset>
</urlset>
16 changes: 8 additions & 8 deletions tpl/tplimpl/embedded/templates/_default/sitemapindex.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range . }}
<sitemap>
<loc>{{ .SitemapAbsURL }}</loc>
{{ if not .LastChange.IsZero }}
<lastmod>{{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
{{ end }}
</sitemap>
{{ end }}
{{ range . }}
<sitemap>
<loc>{{ .SitemapAbsURL }}</loc>
{{ if not .LastChange.IsZero }}
<lastmod>{{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
{{ end }}
</sitemap>
{{ end }}
</sitemapindex>

0 comments on commit 5f42590

Please sign in to comment.