How to include the code of a Confluence user macro from a file?

Michael Rosenberger April 23, 2019

We have developed several User-Macros for Confluence. Currently we develop the macros in VS-Code and then copy&paste the code into the user-macro field of confluence. This works, but is a very error-prone and awkward workflow.

Is it somehow possible to put the user-macro-code in a file and just include that file directly in the macro-editor? 

So it would be possible to use a SCM-Tool such as Git and make a commit to update the macro automatically.

Thanks for your help!

 

1 answer

1 accepted

1 vote
Answer accepted
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2019

To do exactly what you want is not possible as far as I know. But you can package use macros as a plugin. You could then have all of your user macros in a single plugin, the each time you have an update, just regen the plugin, which can then be installed in Confluence. A much easier way to distribute a set of user macros.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events