We want to extend the IngestMarkdown work to emit "sub-documents" in plaintext.
Each document should be broken up into sub-documents based on their h1,h2 headers.
A sub-document should perhaps be modeled something like:
case class SubDocument(anchor: String, title: String, content: String)
Where content should be a plaintext rendering of the content within that sub-document.
The anchor should be the anchor tag to that section of the doc.
And the title should be just the content of the h2 header.
We want to extend the
IngestMarkdown
work to emit "sub-documents" in plaintext.Each document should be broken up into sub-documents based on their h1,h2 headers. A sub-document should perhaps be modeled something like:
Where
content
should be a plaintext rendering of the content within that sub-document. Theanchor
should be the anchor tag to that section of the doc. And the title should be just the content of the h2 header.Related laika docs for custom rendering: https://planet42.github.io/Laika/latest/05-extending-laika/07-new-markup-output-formats.html#implementing-a-render-format