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

Callouts don't work with highlightjs #232

Closed
fhennig opened this issue Jul 4, 2022 · 5 comments · Fixed by #285
Closed

Callouts don't work with highlightjs #232

fhennig opened this issue Jul 4, 2022 · 5 comments · Fixed by #285
Assignees

Comments

@fhennig
Copy link
Contributor

fhennig commented Jul 4, 2022

A Callout is the little number in a circle to annotate source code listings. I've noticed that these don't work on source blocks with highlighting enabled, sadly. It seems like highlightjs is breaking them. I'm unsure what a fix could be.

Here's an example of what it looks like broken: https://docs.stackable.tech/druid/stable/usage.html#_s3_deep_storage

@nightkr
Copy link
Member

nightkr commented Aug 23, 2022

This seems to be related to our custom UI bundle, switching back to Antora's default bundle seems to "fix" it.

@fhennig
Copy link
Contributor Author

fhennig commented Sep 13, 2022

A bit of research results:

  • The breaking commit seems to be this one: stackabletech/documentation-ui@d5c3d38 Highlight.js was upgraded here, from v10 to v11 with some breaking changes.
  • Callouts work in code blocks without highlighting, i.e. if only [source] instead of i.e. [source,yaml] is used.
  • The default Antora UI has not yet upgraded to highlightjs 11, they are still at v9.

It seems to be that the new highlightjs is breaking the callouts. Downgrading to the latest minor version of v10 (v10.7) fixes this.

Edit: "HTML Passthru" was deprecated entirely, without replacement: highlightjs/highlight.js#2889 https://highlightjs.readthedocs.io/en/latest/upgrade-11.html#feature-removal

This is the feature that we relied on to get the callouts in, they are HTML tags put there by asciidoc. No-one stepped up and developed the necessary plugin.

possible paths forward (in my opinion):

  • I would suggest to downgrade back to 10.7 and stay at that version for a while. We should have a look at upgrading this again in half a year or so, and wait on what antora does for their Default UI, as they are going to face the same problem. I'd suggest to just use their solution (possibly migrating to a different highlighter)
  • We could also try to integrate a custom plugin, but I don't thing it's worth it, we don't need the latest highlighjs features I'd say.

@fhennig fhennig moved this to Idea/Proposal in Stackable Engineering Sep 14, 2022
@lfrancke lfrancke moved this from Idea/Proposal to Refinement: Waiting for in Stackable Engineering Sep 15, 2022
@lfrancke lfrancke moved this from Refinement: Waiting for to Development: Waiting for in Stackable Engineering Sep 15, 2022
@fhennig
Copy link
Contributor Author

fhennig commented Sep 19, 2022

We decided to downgrade to v10 and look at this again when Antora upgrades highlightjs in the Default UI

@fhennig fhennig moved this from Development: Waiting for to Development: In Progress in Stackable Engineering Sep 19, 2022
@fhennig fhennig self-assigned this Sep 19, 2022
@fhennig fhennig moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Sep 19, 2022
@fhennig fhennig mentioned this issue Sep 19, 2022
@fhennig fhennig moved this from Development: Waiting for Review to Development: Done in Stackable Engineering Sep 19, 2022
@fhennig fhennig moved this from Development: Done to Acceptance: Waiting for in Stackable Engineering Sep 19, 2022
@lfrancke lfrancke moved this from Acceptance: Waiting for to Done in Stackable Engineering Sep 19, 2022
@lfrancke lfrancke moved this from Done to Waiting for Release in Stackable Engineering Sep 20, 2022
@lfrancke lfrancke moved this from Waiting for Release to Done in Stackable Engineering Sep 20, 2022
@stefano-ottolenghi
Copy link

FYI: Same here. I raised an issue on the default Antora UI Bundle, hopefully it will come onto their radars at some point https://gitlab.com/antora/antora-ui-default/-/issues/203

@fhennig
Copy link
Contributor Author

fhennig commented Feb 15, 2023

Hey, thanks for raising the issue there. I'm interested in seeing how it'll go!

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

Successfully merging a pull request may close this issue.

4 participants