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

Consider supporting xref like syntax in diagrams, translated to diagram specific syntax #109

Closed
djencks opened this issue Jul 5, 2020 · 5 comments

Comments

@djencks
Copy link
Contributor

djencks commented Jul 5, 2020

This may be mostly useful in Antora.
Many types of diagrams, in particular plantuml, support linking from svg diagram elements to elsewhere.
The idea, which Ec Roc thought of, is to allow specifying these links using xref-like syntax, and translating them into the diagram specific syntax.
Since this is kroki I propose calling them 'kref'.
I've implemented a prototype of this as a standalone project, https://gitlab.com/djencks/asciidoctor-antora-kref, but it might make sense to integrate this into asciidoctor-kroki so the block/block macro can communicate the diagram type to the 'kref' inline macro so the desired format does not need to be further specified.
Since I don't have any idea what interpretation or translation of 'xref' syntax might be appropriate outside Antora, I've started by only registering the kref inline macro when Antora is present.

@kaja-mohideen
Copy link

Useful feature. Any update whether this proposal would make it in some future release?

@ggrossetie
Copy link
Member

I gave it a lot of thought but I think it should be done in a dedicated extension. Using a tree processor will give you the diagram type. You can also use a non-conflicting syntax (depending on the diagram syntax) to declare a cross-reference.

For instance, PlantUML is using [[https://antora.org]], we could use a special protocol to indicate that this is a cross-reference: [[antoraxref://2.3@antora:ROOT:how-antora-works.adoc]]. The tree processor will read/parse the content and replace antoraxref://2.3@antora:ROOT:how-antora-works.adoc with an actual HTTP(s) URL.

@ggrossetie
Copy link
Member

Feel free to join https://chat.antora.org/ to continue the discussion.

@maxfilov
Copy link

@ggrossetie can you please give a link to the discussion? We were trying to find it but with no luck.

@ggrossetie
Copy link
Member

can you please give a link to the discussion? We were trying to find it but with no luck.

https://antora.zulipchat.com/#narrow/stream/282400-users/topic/Integrating.20links.20to.20Antora.20objects.20in.20PlantUML.20diagrams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants