PacoVK / antora-confluence

Plugin to publish your Antora docs to Confluence
Apache License 2.0
14 stars 3 forks source link

Publication failing when a page title (link) is broken #29

Open TitouanM opened 4 months ago

TitouanM commented 4 months ago

Hello

I'm using tis plugin on a big Antora project. Some links seems to be broken or pointing on a page that doesn't exist.

Actually, the confluence publication fails and stops at the first broken link.

Would it be possible to add an option to ignore those broken links please ?

Best regards

PacoVK commented 4 months ago

So you want an option to allow the export of pages with broken links?

Could you provide me the error logs and an example that causes the error? I could investigate and fix the issue probably.

TitouanM commented 4 months ago

I have some examples that cause the issue :

The same issue happen with attachments, links, images .

The error log : {"level":"fatal","time":1720179763956,"name":"antora","err":{"type":"TypeError","stack":"TypeError\n at /node_modules/antora-confluence/dist/lib/transformer/LinkTransformer.js:98:140\n at Array.forEach (<anonymous>)\n at rewriteInternalLinks (/node_modules/antora-confluence/dist/lib/transformer/LinkTransformer.js:77:41)\n at processPage (/node_modules/antora-confluence/dist/lib/service/PageService.js:303:52)\n at publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:187:40)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)"},"msg":"Cannot read properties of undefined (reading 'pageTitle')"}

Hope this helps !

Thanks for your fast answer !