Create new route with extension (example: feed/sitemap.rss)

Very common case for newspaper website is providing some custom rss feeds. To accomplish that with Publisher you need to create new route (ex: feed/sitemap) and attach selected template to it.

After hitting this route you will see output generated by template but you will find out that Content Type of this route response is set to text/html - and it can create issues for some parsers.

To fix that problem you just need to rename your route to one with extension at end. For example feed/sitemap.rss. Publisher will automatically recognize route extension and will set proper Content-Type header - in this case: application/rss+xml.

This feature can be used for generating custom xml files, or even JavaScript files (with extension .js).