-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 block macro #1
Comments
Well, @Mogztter and @djencks, I spent a while trying to get this to work, and then realized it was going to have to also pull in the Since it looks like you two took part in doing that for the PlantUML extension, if you would ever care to do the same for this one it would be most appreciated. Otherwise, it works nicely as a block processor without all that complexity. |
In this case, the target of the block macro is a file and the block macro extension is responsible for:
At first, reading the content of a file from a path seems easy, right? But depending of the context you need to provide the proper implementation. Antoraif you are using this extension in Antora then, you want to resolve the target from the catalog because the target is a resource identifier NodeHere we can use the Node module BrowserWe cannot use the Node module GraalVMWe could go on step further and use this extension in GraalVM. In this case, you cannot use We had a related discussion with @djencks and Dan and I think that Asciidoctor should provide an API and/or provide a Virtual File System.
Yes because you need to produce a "browser-compatible" version of the library. The main part is to produce a single JavaScript file because the browser won't resolve the Node @brunchboy Does it make sense? |
Thanks for the details! I still can’t understand how a browser would get involved though? And this is definitely more than I want to develop or maintain. 😞 @djencks’ Antora pipeline extension made it seem so easy! |
It would be nice if you could also create a diagram using a block macro to reference the source file, along the lines of:
I considered adding this, following the example of the PlantUML extension, but there is far too much code in there that I don’t understand at all, for interacting with the Antora virtual filesystem, I think. If anyone who is comfortable in both Javascript and the Asciidoctor and Antora APIs could add this feature, a pull request would be lovely.
The text was updated successfully, but these errors were encountered: