Hi Matt,
The recipe you linked to describes a workaround for something that Scroll Viewport does not yet support natively. We have an improvement request for this in our issue tracking system:
https://k15t.jira.com/browse/VPRT-824. You can watch this issue or vote on it if you like.
Having a reverse proxy serve a sitemap.xml file is another workaround that is unrelated to the approach with the sitemap.xml page and the sitemap.xml.vm template file.
The workaround with the sitemap.xml page only works if you use Scroll Viewport with hierarchical URLs. The page "sitemap.xml" has to be a direct child of your home page, so that its viewport-relative URL is simply "sitemap.xml" (note that you have to set the advanced plugin setting "slugs" to "classic" or the URL will be "sitemap-xml"; you can configure these settings at "<confluence-base-url>/plugins/servlet/scroll-settings/"; depending on your needs, you may or may not care about the name of the sitemap file in the URL). The template "sitemap.xml.vm" can be located anywhere in your theme or in fact have any name ending in ".vm". You just have to make sure that you provide the correct path in the page property on the sitemap.xml page. So if your template is at "/my-templates/my-sitemap.vm" in your theme, the template property on the sitemap.xml page has to contain that value. In addition you need some sort of dispatching mechanism in your page.vm that calls the template if the page property "template" is present.
Example page.vm:
#if ($page.properties.template)
$include.template($page.properties.template)
#else
<!-- normal page.vm code -->
#end
This code is very generic and allows you to provide custom templates for other pages if you add the page property "template". Instead you could of course also check if the current page is titled "sitemap.xml" and then dispatch to your sitemap.xml.vm template. In that case you wouldn't need the page property.
In this setup the sitemap is generated on the fly whenever someone requests the page.
I hope this made things a bit clearer.
Best regards,
Maximilian