Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for asciidoctorj for qute-web-asciidoc extension #119

Open
mcruzdev opened this issue Oct 9, 2024 · 7 comments
Open

Add support for asciidoctorj for qute-web-asciidoc extension #119

mcruzdev opened this issue Oct 9, 2024 · 7 comments
Labels
area/asciidoc enhancement New feature or request

Comments

@mcruzdev
Copy link
Member

mcruzdev commented Oct 9, 2024

We are currently developing an extension called qute-web-asciidoc, which utilizes a pure Java library behind the scenes to convert AsciiDoc to HTML. While the library is efficient and lightweight, it lacks some of the advanced features offered by AsciidoctorJ.

Our goal is to enable switching between both implementations, providing flexibility depending on the specific needs or feature requirements of the project.

@mcruzdev
Copy link
Member Author

mcruzdev commented Oct 9, 2024

@mkouba @maxandersen will we use a config like quarkus.datasource.db-kind=postgresql does?

@mkouba
Copy link
Contributor

mkouba commented Oct 9, 2024

I'm not sure to be honest. We could create a separate extension - qute-web-asciidoctorj that would depend on qute-web-asciidoc and "deactivate" the default implementation based on asciidoc-java.

mcruzdev pushed a commit to mcruzdev/quarkus-qute-web that referenced this issue Oct 9, 2024
@mkouba mkouba added the enhancement New feature or request label Oct 11, 2024
@gsmet
Copy link
Member

gsmet commented Nov 14, 2024

I recently stumbled upon https://github.com/fluorumlabs/asciidocj which might be a good component for pure Java Asciidoc transformation.

What I liked (and what I was looking for) is that it has an actual parser and it seems to compare its output with the reference impl in the tests.

Now it doesn't look actually maintained but it might be a good lightweight alternative to using JRuby.

To give some context about what I was looking for: I want to implement a lightweight Asciidoc -> Markdown transformation and I was looking for components that might help.
The parser here could be a good base for this work except it actually already transforms things to HTML while parsing so I somehow need to change it to not be HTML-based.

/cc @jtama

@gsmet
Copy link
Member

gsmet commented Nov 14, 2024

And if someone is interested in collaborating on a component that could output both HTML and Asciidoc (agnostic parser) based on fluorumlabs/asciidocj and then have the ability to output in whatever format, I'm all ears as I have been very time-constrained lately :)

I have a few ideas but didn't have the time to go beyond that.

That being said, even without this work fluorumlabs/asciidocj could be a good alternative as it outputs HTML, which is what you want.

@jtama
Copy link
Member

jtama commented Nov 14, 2024

Maybe this is what you're looking for : https://github.com/opendevise/downdoc. It's not java, but it does converts asciidoc to markdown.

I don't have much time either.

@gsmet
Copy link
Member

gsmet commented Nov 14, 2024

Yeah I know about this one but as you say, it's not Java :). And the code is far from being easily adaptable to Java.

@gsmet
Copy link
Member

gsmet commented Nov 14, 2024

But if I were you, I would just give a try to the component I pointed above. It might be a lot better than the component you are using at the moment (at least that was my impression when I was doing my research) and it should be usable out of the box for what you want to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/asciidoc enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants