question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Custom AsciiDoc macros

See original GitHub issue

Hey everyone, and first of all thank you for this plugin, which is working great.

I was wondering if there’s any support to give the plugin a custom AsciiDoc macro that will be expanded when the plugin runs.

I am currently generating my API documentation using Spring REST Docs and it’s working fine, now I’d like to upload the same output to Confluence, however, the confluence-publisher plugin doesn’t know about the operations macro that is built-in Spring REST Docs.

Is there any support for Spring REST Docs, or at least custom AsciiDoc macros that could be passed to the AsciiDoc process so that my snippets are correctly rendered in-before going to be uploaded to Confluence ?

Thank you very much for any hindsight 👍

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
Alorencommented, Nov 2, 2021

Thanks @zeldigas for quick tutorial! I was able to build my own extension easily. Also I would like to mention that if you are going to add your custom extension to the asciidoc-confluence-publisher-maven-plugin, you will need to do it like this:

<plugin>
  <!--See: https://confluence-publisher.atlassian.net/wiki/spaces/CPD/overview?mode=global-->
  <groupId>org.sahli.asciidoc.confluence.publisher</groupId>
  <artifactId>asciidoc-confluence-publisher-maven-plugin</artifactId>
  <version>${asciidoc-confluence-publisher-maven-plugin.version}</version>
  <dependencies>
    <dependency>
      <groupId>my-extension-group-id</groupId>
      <artifactId>my-extension-artifact-id</artifactId>
      <version>my-extension-version</version>
    </dependency>
  </dependencies>
</plugin>

This way you can add any extension to the Confluence publisher.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Macro Substitutions | Asciidoctor Docs
The content of inline and block macros, such as cross references, links, and block images, are processed by the macros substitution step.
Read more >
how to define own asciidoc macro - Stack Overflow
I think that you can work with the include macro and variables in Asciidoctor: Create a file called snippet. adoc (my example is...
Read more >
AsciiDoc Frequently Asked Questions
AsciiDoc Frequently Asked Questions · 1. How do you handle spaces in included file names? · 2. How do I number all paragraphs?...
Read more >
AsciiDoc cheatsheet - Powerman
Macros : links, images & include. If you'll need to use space in url/path you should replace it with %20.
Read more >
Asciidoctor User Manual
We also encourage you to ask questions and discuss any aspects of the project ... Any of these templates can be replaced by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found