I am creating a second sitemap, but unsuccessfull

Hi, I am creating a new sitemap for my posts

so I stored file in my default


The code

{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\"?><?xml-stylesheet type=\"text/xsl\" href=\"/css/sitemap.xsl\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	{{- range where .Site.RegularPages "Section" "isset" "posts" }}
	   	<loc>{{ .Permalink | absURL }}</loc>
        <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>
	{{- end }}

and the config

    MediaType              = "application/xml"
    BaseName               = "post-sitemap"
    IsHTML                 = false
    IsPlainText            = true

  home = ["HTML", "POSTSITEMAP", "RSS"]

But the error is

found no layout file for "postsitemap" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

What is the solution. Please help me…

rename the template to home.postsitemap.xml


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.