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

Add reveal.js-menu plugin #312

Closed
chbndrhnns opened this issue Mar 10, 2020 · 4 comments
Closed

Add reveal.js-menu plugin #312

chbndrhnns opened this issue Mar 10, 2020 · 4 comments

Comments

@chbndrhnns
Copy link

I tried to add this plugin myself but it would require lots of changes to --css and --scripts parameters due to the many files.

Would it be possible to add it to the included plugins?

@chbndrhnns
Copy link
Author

It was easier than I thought. Instead of using yarn add reveal.js-menu, I put the plugin content into my assets folder.

@Ouch1978
Copy link

Ouch1978 commented Aug 12, 2021

Hi @chbndrhnns,

I'm trying to add plugins into my slides according to this, but in vain.

The following is what I did:

  1. Run yarn add reveal.js-menu.
  2. Create a folder named "plugin".
  3. Copy reveal.js-menu from node_modules to the plugin folder.
  4. Add the following content into reveal-md.json:
    "scripts": [
        "plugin/reveal.js-menu/menu.js",
        "plugin.js"
    ]
  1. Add a new file named plugin.js, and add the following content:
options.plugins.push(
  RevealMenu
);
  1. run reveal-md with command:
reveal-md slides/Test1.md --scripts plugin.js

The slide generated, but seems the menu not working for me.

And I found there is an error in DevTools console that says: Uncaught ReferenceError: RevealMenu is not defined

Would you please explain how you made it?

Thank you.

@Ouch1978
Copy link

I finally figure it out.

Just execute

reveal-md slides/Test1.md

without --scripts plugin.js is working for me.

@chbndrhnns
Copy link
Author

Oh great because I did not manage yet to get to your question

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

2 participants