Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asciidoctor-treeview plugin no longer works with Antora #10

Open
DryHumorInDC opened this issue Jul 2, 2024 · 3 comments
Open

Asciidoctor-treeview plugin no longer works with Antora #10

DryHumorInDC opened this issue Jul 2, 2024 · 3 comments
Assignees

Comments

@DryHumorInDC
Copy link

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
Copy link

mojavelinux commented Jul 3, 2024

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
Copy link
Owner

lask79 commented Jul 3, 2024

@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.

@lask79 lask79 self-assigned this Jul 3, 2024
@mojavelinux
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants