Main packages:
core.rendering,core.pipeline.outputRendering modules:
quarkdown-html,quarkdown-plaintext
After obtaining the translation of the AST to the target format from the Renderer, you might notice that it is not enough to display to the user. Considering the HTML format, that is just the content that would go inside <body>, but everything else is missing: metadata, styling, and possibly a runtime.
Here comes the post-renderer, which programmatically builds the full document around the rendered content. For HTML, this is handled by HtmlDocumentBuilder (using the kotlinx.html DSL), located in html.post.document. The builder injects all the needed data, such as:
<body>On top of that, the post-renderer is also responsible for returning the output resources of the compilation. These resources include:
These resources are then added to those provided by the media storage and ultimately returned by the pipeline. It is then up to the invoker to handle those resources, which in the case of CLI are saved to file.