We already have a documentation page for the template registry, but we do not have a good tutorial for generating and registering custom templates. The existing unit tests are probably a good starting point for this document.
The API may not be quite stable yet, so I am opening this issue as a placeholder.