Rework example docs generator to use explicit templates
Currently, the template mechanisms to render the documentation text is not well documented, rather hidden and not intuitive. IIUC, it re-uses some text found in an equally named file under the examle/scalalib structure, under some conditions, which are not obvious.
-
Instead we should either move the shared snippets/documents into it's own structure, e.g.
example/template, so it is more obvious when and what is used. -
Or we should explicitly refer to the template from the file where we want to use it.
-
A combination of 1. and 2. could be to have templates in its own structure and refer to the base dir of the structure from the use-site.
As part of the process, any documentation of the current processing can be collected as comments.