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

Feature/confluence macros #27

Merged
merged 4 commits into from
Oct 1, 2020

Conversation

Skeeve
Copy link
Contributor

@Skeeve Skeeve commented Oct 1, 2020

As I had no success in automatically generating ToCs using markdown editor plugins which can be used in confluence, I first had the idea to implement a new command line switch like -toc 2-5. But since this required a lot of changes and would be a bit inflexible, I implemented the possibility to insert any Confluence macro in markdown by using fenced code blocks.

The only change required for this is to enhance the fencedcode-code.

Please see the Readme for an example.

@justmiles
Copy link
Owner

Awesome! This is super useful!

I tested it with a few pages and while it definitely works, it's not going to support all macros. Looking into this a bit more I see Confluence already has a "markup" language for inserting macros. However, it doesn't seem to be accessible via the API. The key difference as far as I can tell is that their markup format supports adding the body of a macro. So for instance, it can render the panel macro with more than just the attributes.

{panel:title=My title|borderStyle=dashed|borderColor=blue|titleBGColor=#00a400|titleColor=white|bgColor=#72bc72}
A formatted panel
{panel}

Adding support for their already existing markup syntax might be a good idea. Regardless, this is certainly an improvement so I'm happy to merge. Thanks for contributing!


@justmiles justmiles merged commit 6ceec6c into justmiles:master Oct 1, 2020
@Skeeve Skeeve deleted the feature/confluence-macros branch October 1, 2020 17:33
@Skeeve
Copy link
Contributor Author

Skeeve commented Oct 1, 2020

I think those macros that won't work are those where it's possible to insert some text, like, for example, the code macro or maybe the panel macro you mentioned.

I do not think that it's too useful to support the Confluece syntax, but on the other hand: It's not too difficult.

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

Successfully merging this pull request may close these issues.

None yet

2 participants