Skip to content

Config Doc - Support more features in Asciidoc -> Mardown converter #43287

Open
@gsmet

Description

While I implemented a first version of an AsciiDoc -> Markdown converter here: #42677 (see specific commit introducing the asciidocToMarkdown method in JavadocToMarkdownTransformer), there are still features that we need to support...

A good example of what we need is in the https://quarkus.io/guides/hibernate-search-orm-elasticsearch#configuration-reference-main where Yoann had a lot of fun.

  • Ideally, we would need to support some of the Asciidoc attributes such as {hibernate-search-docs-url}. They would have to be obtained from the Maven properties as they are currently defined there and we want to be consistent.
  • We would have to support the dt/dd constructs:
`simple`::
The default, future-proof strategy: if the index name in Hibernate Search is `myIndex`,
this strategy will create an index named `myindex-000001`, an alias for write operations named `myindex-write`,
and an alias for read operations named `myindex-read`.
`no-alias`::
A strategy without index aliases, mostly useful on legacy clusters:
if the index name in Hibernate Search is `myIndex`,
this strategy will create an index named `myindex`, and will not use any alias.
  • We would have to support tables (note that they are not using the usual | marker so we would have to support whatever is there):
[cols=5]
!===
.2+h!Strategy
.2+h!Throughput
3+^h!Guarantees when the application thread resumes

h!Changes applied
h!Changes safe from crash/power loss
h!Changes visible on search

!async
!Best
^!icon:times[role=red]
^!icon:times[role=red]
^!icon:times[role=red]

!write-sync (**default**)
!Medium
^!icon:check[role=lime]
^!icon:check[role=lime]
^!icon:times[role=red]

!read-sync
!Medium to worst
^!icon:check[role=lime]
^!icon:times[role=red]
^!icon:check[role=lime]

!sync
!Worst
^!icon:check[role=lime]
^!icon:check[role=lime]
^!icon:check[role=lime]
!===

Given the complexity of these tables, we won't be able to render them as plain Markdown tables so they will have to be rendered as HTML. We might not be able to render all the subtleties in Markdown (typically not sure if we can center things when using HTML in Markdow...).
It should be rendered as:
Screenshot from 2024-09-13 19-40-01

  • And given what I just pasted, we would have to translate some of the icons too.

And probably more to follow...

Metadata

Assignees

No one assigned

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions