使用CLI和宏程序将页面编程添加到Confluence

3

我正在尝试将我们的Mediawiki迁移到Confluence。我们尝试了使用Universal Wiki Converter,但它会导出HTML内容,因此我们必须手动在Confluence中使用HTML宏。显然,我们无法为wiki中的每个页面手动执行此操作。我使用了Confluence CLI的功能:

confluence --action convertToStorageFormat --space "ITWP" --title "test001" --content "{html}bodytext{html}"   --server  --user  --password 

它会输出类似于这样的内容:
<ac:structured-macro ac:name="html"><ac:plain-text-body><![CDATA[bodytext]]></ac:plain-text-body></ac:structured-macro>

这又被Confluence拒绝了。

有没有办法我只是发送HTML内容到Confluence,它使用HTML宏来解析和显示像以前一样的标准页面?

1个回答

1
您所看到的是汇合物浆格式:
<ac:structured-macro ac:name="html">

是html-macro的开始标签等等。 如果安装了“源编辑器”插件,您应该能够输入:

<ac:structured-macro ac:name="html">
  <ac:plain-text-body>
    <![CDATA[bodytext]]>
  </ac:plain-text-body>
</ac:structured-macro>

进入其中,您将在Confluence页面上获取我们的内容(预览已安装html-macro插件)


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接