generate-secondaries is a plugin for Collection
This plugin creates the Secondary files that are generated by Documentable for the Raku documentation system.
Operation
The render key means that the templates will be installed, and the 'secondaries' name-space
will be created. But a 'heading' name-space is required for the heading template, and it
needs to contain a defs key. This is done by the render callable.
The template analyses the header using regexen and adds the results to defns.
The information is used to generate the Secondary files during the compilation stage, and to update the %processed data for other Compilation plugables to access. The files are transferred to the output directory during the compilation stage.
During the transfer stage, the secondary files are deleted from the plugin's directory.
Secondary files
Raku documentation contains many =head blocks that define routines (methods, roles, subs etc)
and syntax (infix postfix etc). These items may be defined and documented separately for different Types.
It makes sense to gather the same method name into a separate page.
The headers are analysed when the template is composed.
The files are generated during the compilation stage.
The biggest problem is to define how much text to include after the definition header. The plugin
adds a <!--- defnmark d --> where d is the header level. Html to the next C< <hd > container,
where d is the same number, or the end of the html, is then included.
Templates
Replaces Header template with one that creates the information for Secondary files