I'm about to start using Asciidoc to write the doc of my software.
When referencing issues in my Bug tracker I'd like to avoid having to enter the complete url.
I would like to use something like "bug:33" that will be replaced by the following link "http://mybugtracker.com/issue/22[Issue 22]"
I tried to search how to do that but could not figure it.
Is this already covered by something I missed ?
Should I use macro ? If so, can I define them in my adoc files ?
As far as I know the macro cannot be defined inside an Asciidoc File (as you can do with LaTex ). You need to write some code. You can use in one of this programing languages:
* One language of the JVM (Java, Groovy, ...)
What you will choose, depends on the build system you use to build your documentation.
We are a Java company using maven, so the choice was straight forward for us. There is an example of what you want to do java-extension-example (This is the twitter example, but this is really close to the issue-tracker use case).
Please note that you can write extensions in Ruby and still use them in Java (Maven or Gradle build). AsciidoctorJ is a Ruby environment, so you can load Ruby scripts into it. While it's possible to write extensions in Java, it is definitely a lot simpler to write them in Ruby. Your choice.