Using project sitemaps
After Forrest 0.6 it is now possible for projects to intercept the core sitemaps, without needing to copy the main sitemaps and keep them synchonised. This will enable hassle-free update to future Forrest versions.
How does it work?
If a project has a sitemap.xmap file in it's documentation dir, that gets mounted automatically by Forrest and becomes part of the processing: it is a preprocessing step, and is the first one to handle the request. Because of this it can serve any file directly. If it does not want to serve a file, it can simply not match the URL and Forrest will take care of it as usual.
The cool thing is that if that pipeline serves an xml representation, Forrest will provide a skinned version of it.
So if the project sitemap matches test.xml and transforms that to a correctly structured Forrest intermediate "document-v*", then the user will see test.html fully rendered by Forrest.
Of course, to resolve the directories in your sitemap it is important to use the 'project:' and 'forrest:' variables to prevent any possible issue in the future.