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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify revealjs supported plugins list and attributes #464

Open
bcouetil opened this issue Mar 6, 2022 · 2 comments
Open

Clarify revealjs supported plugins list and attributes #464

bcouetil opened this issue Mar 6, 2022 · 2 comments

Comments

@bcouetil
Copy link

bcouetil commented Mar 6, 2022

Thank you again for this wonderful tool 馃

I have a hard time figuring how to enable plugins.

First, the documentation speak about attributes that should be enable/disable and the example says disable[d].

Then we know that zoom and notes are there by default, and indeed, I see inclusion when debugging in browser :

Screenshot from 2022-03-06 10-09-30

Then I download revealjs, checkout the appropriate tag (3.9.2) maching my asciidoctor-revealjs version, list every plugin in the folder, and wild guess some attributes to test :

= Title

:revealjs_plugin_highlight: enabled
:revealjs_plugin_markdown: enabled
:revealjs_plugin_math: enabled
:revealjs_plugin_multiplex: enabled
:revealjs_plugin_print-pdf: enabled
:revealjs_plugin_search: enabled

== Chapter

But then only one more (markdown) seems to be activated :

Screenshot from 2022-03-06 10-10-38

Could the documentation be more precise on this point, please ? 馃檹

@ggrossetie
Copy link
Member

Version 4.1.0 has built-in support for zoom, notes and marked/markdown plugins:

def revealjs_dependencies(document, node, revealjsdir)
dependencies = []
dependencies << "{ src: '#{revealjsdir}/plugin/zoom-js/zoom.js', async: true }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
dependencies << "{ src: '#{revealjsdir}/plugin/markdown/marked.js', async: true }" if (node.attr? 'revealjs_plugin_marked', 'enabled')
dependencies << "{ src: '#{revealjsdir}/plugin/markdown/markdown.js', async: true }" if (node.attr? 'revealjs_plugin_markdown', 'enabled')
if (node.attr? 'revealjs_plugins') &&
!(revealjs_plugins_file = (node.attr 'revealjs_plugins', '').strip).empty? &&
!(revealjs_plugins_content = (File.read revealjs_plugins_file).strip).empty?
dependencies << revealjs_plugins_content
end
dependencies.join(",\n ")
end

reveal.js plugins system changed quite a bit in reveal.js 4: https://github.com/hakimel/reveal.js/tree/4.3.0/plugin

  • highlight
  • markdown
  • math
  • notes
  • search
  • zoom

In Asciidoctor reveal.js 5.0.0, we support the notes, search and zoom plugins.
Asciidoctor has already built-in support for STEM (using MathJax.js) and source highlighting using Highlight.js so there's no need to enable the math or highlight plugin.

We also decided to drop the markdown plugin since the content is already written in AsciiDoc (see #432).

Feel free to improve the 4.1 documentation by using the "Edit this Page" button on the top right corner.

We could also improve the documentation for 5.0.0: https://github.com/asciidoctor/asciidoctor-reveal.js/blob/master/docs/modules/converter/pages/revealjs-plugins.adoc by mentioning which plugins are supported and why markdown, highlight and math plugins are superfluous.

@bcouetil
Copy link
Author

bcouetil commented Mar 6, 2022

Thank you for your quick and detailed response.

I'll process this and will try to help on documenting this !

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

No branches or pull requests

2 participants