From 148fedd227b8f4f5af8f72cb6841653140f82dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 25 Mar 2017 10:14:12 +0100 Subject: [PATCH] hugolib, tplimpl: Use OutputFormats to create atom links --- hugolib/hugo_sites_build_test.go | 14 +++++++------- tpl/tplimpl/template_embedded.go | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hugolib/hugo_sites_build_test.go b/hugolib/hugo_sites_build_test.go index 5f3ef7a70..e0d3ce7b8 100644 --- a/hugolib/hugo_sites_build_test.go +++ b/hugolib/hugo_sites_build_test.go @@ -112,13 +112,13 @@ func doTestMultiSitesMainLangInRoot(t *testing.T, defaultInSubDir bool) { th.assertFileContent("public/en/sitemap.xml", "http://example.com/blog/en/") // Check rss - // TODO(bep) output the Atom link must be cretated from the OutputFormats.RSS.Permalink - // th.assertFileContent("public/fr/index.xml", `{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} {{ range .Data.Pages }} {{ .Title }}