Generation implementations¶
There are two main implementations of the Generation core extension point:
SingleModuleGeneration
- generates documentation for a single module, for instance whendokkaHtml
task is invokedAllModulesPageGeneration
- generates multi-module documentation, for instance whendokkaHtmlMultiModule
task is invoked.
SingleModuleGeneration¶
SingleModuleGeneration
is at the heart of generating documentation. It utilizes core and
base extensions to build the documentation from start to finish.
Below you can see the flow of how Dokka's data model is transformed by various core and base extensions.
flowchart TD
Input -- SourceToDocumentableTranslator --> doc1[Documentables]
subgraph documentables [ ]
doc1 -- PreMergeDocumentableTransformer --> doc2[Documentables]
doc2 -- DocumentableMerger --> doc3[Documentables]
doc3 -- DocumentableTransformer --> doc4[Documentables]
end
doc4 -- DocumentableToPageTranslator --> page1[Pages]
subgraph ide2 [ ]
page1 -- PageTransformer --> page2[Pages]
end
page2 -- Renderer --> Output
You can read about what each stage does in Core extension points and Base plugin.
AllModulesPageGeneration¶
AllModulesPageGeneration
utilizes the output generated by SingleModuleGeneration
.
Under the hood, it just collects all of the pages generated for individual modules, and assembles it all together, creating navigation links between the modules and so on.