quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.58k stars 2.63k forks source link

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

Open gsmet opened 1 week ago

gsmet commented 1 week ago

While I implemented a first version of an AsciiDoc -> Markdown converter here: https://github.com/quarkusio/quarkus/pull/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.

`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.
[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 probably more to follow...

quarkus-bot[bot] commented 1 week ago

/cc @radcortez (config)

gsmet commented 1 week ago

FWIW, I think it might be a good first issue as it's really tied to the core/processor module and might be easier with some AI help.

gsmet commented 1 week ago

@ppalaga it would be helpful if you could have a look at what I did here: https://github.com/quarkusio/quarkus/pull/42677/commits/10ffdcb30e602b18990cd8e76a7d31a170341fd6 and add more things that we need to support.

ppalaga commented 5 days ago

Thanks for the heads up, @gsmet. I wonder whether you have any good method to validate the output for a given extension? My understanding is that it is supposed to output some structured output for IDEs. Are there some (which) IDEs supporting that format already? Do I need some specific IDE plugin to view the rendered config property docs?