ignore markdown-lint tags when publishing pages
BigMichi1 opened this issue ยท 9 comments
we are currently validating all our markdown files that will be published to confluence by https://github.com/DavidAnson/markdownlint
at some places we are disabling the lining via <!-- markdownlint-disable -->
and enabling it afterwards via <!-- markdownlint-enable -->
the problem now is that when these pages are published to confluence it fails
12:18:48.057 [INFO] [ERROR] Failed to execute goal org.bsc.maven:confluence-reporting-maven-plugin:7.8:deploy (deploy) on project checkstyle: error generating report: error: create page
12:18:48.057 [INFO] [ERROR] Response{protocol=http/1.1, code=500, message=, url=[https://confluence.xxx.de/rest/api/content}](https://confluence.xxx.de/rest/api/content%7D)
12:18:48.057 [INFO] [ERROR] {"statusCode":500,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'html' is unknown.","reason":"Internal Server Error"}
12:18:48.057 [INFO] [ERROR] -> [Help 1]
is there any way to ignore these tags before sending the page to confluence?
Hi @BigMichi1 thanks for feedback
looking reported error it is The macro 'html' is unknown.
. In my experience this cannot be related to plugin but to the confluence server. I Think that you've to enable support for "html macro" from confluence server side
Take look to
thx, we checked it and the plugin is disabled and can not be enabled because of some company policies forbidding HTML content in confluence. any way to bypass these HTML content blocks when publishing/transforming the page, maybe with an option?
tested against a confluence server on my own and HTML plugins are enabled but still the same error appears. strange.
removing these two commends in the markdown for disabling and enabling and it works on both confluence servers (with and without HTML plugin)
let me investigate
Hi @BigMichi1
I've introduced a new option skipHtml
on markdownProcessor
parameter to handle your use case
Usage Example
<configuration>
<encoding>UTF-8</encoding>
<failOnError>true</failOnError>
<siteDescriptor>${basedir}/src/site/confluence/issue284/site.yml</siteDescriptor>
<markdownProcessor>
<skipHtml>true</skipHtml><!-- ๐ -->
</markdownProcessor>
</configuration>
I've deployed dev release 7.10-SNAPSHOT
. Please, take chance to test it an let me know if it works as expected
thx, will test it tomorrow and report back
works perfectly, thank you so much
Hi @BigMichi1 thank you for your valuable feedback and test
feature released in version 7.10