How to create a second, different sitemap

Reading the entire alternative output formats section there’s nothing in it to say that that lends itself to the task of producing one new output file from many pages as with a sitemap. Then again it doesn’t say it wont do that either. However I presume that the processing that generates RSS and Sitemaps is “special” somehow.

EDIT:

Righto - I have a solution of sorts. It does not come with the confidence of complete understanding but with the input of your good selves I have achieved what looks like a workable option. So Thanks.

Here’s the pieces:

  1. I have a template file _default/home.videositemap.xml
  2. In that file I can range over .Data.Pages to get the whole site.
  3. In config.toml I have:
[outputFormats]
  [outputFormats.videositemap]
    baseName = "videositemap"
    isPlainText = false
    mediaType = "application/xml"
    protocol = "xml://"
    path = "/"

[outputs]
  home = ["HTML", "videositemap", "RSS"]

And together that produces a file /videositemap.xml

Which is what I wanted.

Thanks for your ideas / help / and pointers Rick & JU52

G

2 Likes