lask79 / asciidoctor-treeview

Generates tree views based on ascii-tree with beautiful icons for folders and icons
Mozilla Public License 2.0
10 stars 0 forks source link

Asciidoctor-treeview plugin no longer works with Antora #10

Open DryHumorInDC opened 2 days ago

DryHumorInDC commented 2 days ago

Please see this post in the Antora chatroom.

Is there something that needs to happen with asciidoctor-treeview? If I were smart enough, I'd do a PR. Assuming you dogfood this, I also wanted you to be aware of this for your own use.

mojavelinux commented 2 days ago

It's not valid to use the same entry point as both an Antora extension and Asciidoctor.js extension. That should have never worked, but Antora was not checking, so it worked by accident. (To be clear, it doesn't work with Antora 3.1.8 because Antora now enforces the signature of an Antora extension as documented).

This package should provide a dedicated require path for the Antora extension. It also makes it much more clear to users that the extension is supposed to go under the antora key and not the asciidoctor key.

antora:
  extensions:
  - asciidoctor-treeview/antora-extension

That path must export a valid register function.

The Antora extension can still be used to register the Asciidoctor.js extension, so that part is fine.

lask79 commented 2 days ago

@mojavelinux @DryHumorInDC: Thx for bringing this up. I will take a look. To be honest I thought I implemented it in a way that it worked for both so that we do not have to use 2 different extensions.

I will check the next days what I have to do to fix it. But that also means That I have to provide 2 extensions. One for Antora and one for Asciidoctor. Or at least 2 different entry points.

I am guessing I am having the same issue with my shiki extension. So I will take a look there as well.

mojavelinux commented 2 days ago

It's fine for the Antora extension to register the Asciidoctor.js extension. But you do need two separate entry points.