asciidoctor / asciidoctor-epub3

:blue_book: Asciidoctor EPUB3 is a set of Asciidoctor extensions for converting AsciiDoc to EPUB3
https://asciidoctor.org
MIT License
216 stars 67 forks source link

define project-name attribute before document title to fix a warning in Asciidoctor 2 #395

Closed mojavelinux closed 3 years ago

mojavelinux commented 3 years ago

I think the problem is that this attribute is used in the page title, and some places in the Antora pipeline don't support that use case unless the attribute is defined in the component descriptor. This is the best short-term fix.

slonopotamus commented 3 years ago

I'm not sure what warning you're talking about, but I am ready to merge this if you say it is a good thing :) Actually, there's no reason to use attribute in page title, I can easily make it just text.

mojavelinux commented 3 years ago

I went looking for it and it appears to be a regression caused by the upgrade to Asciidoctor 2 in Antora (currently in Antora 3.0.0-alpha.3). Either that, or Asciidoctor 2 detects an unresolved attribute reference somewhere Asciidoctor 1 does not. I narrowed it down to this page in Asciidoctor EPUB3, but I'm not sure yet why. I'm investigating.

Here's the reference: https://app.netlify.com/sites/asciidoctor-docs/deploys/607960b4b1f74d00071fd4ca#L64-L65

mojavelinux commented 3 years ago

I've determined this is a bug (or bug-ish) in Asciidoctor. I'm going to address it there. It shouldn't require a change to the content. Though, if you really want the most accurate fix, I've updated the PR to show what that would be.

mojavelinux commented 3 years ago

Here's the related issue in core: https://github.com/asciidoctor/asciidoctor/issues/4024

slonopotamus commented 3 years ago

We can define attributes before document title? o_O My world will never be the same.