denehyg / reveal.js-menu

Slide out menu for reveal.js
https://denehyg.github.io/reveal.js-menu
MIT License
281 stars 76 forks source link

Problem implementing in RStudio #73

Closed drfurtado closed 3 years ago

drfurtado commented 3 years ago

I am using RStudio and would love to add this plugin to my reveal.js presentations.

I have installed the reveal.js and followed your instructions to install it manually. I created a folder called plugins/menu and included the repository in there.

Now, I do not know for sure where to place the following:

Any help is much appreciated

ps. I should say that I am working off this repo: https://github.com/rstudio/revealjs

denehyg commented 3 years ago

I’m not familiar enough with RStudio but the repo you’re working from has the menu plugin included (albeit an old version). I would expect that there is no need to install the menu plugin yourself, just follow the instructions (https://github.com/rstudio/revealjs#reveal-plugins) in that repo.

If you’re adding the menu plugin to the HTML output then the instructions above are fine. I usually put the script tags at the end of the body element. For example, see the source for the demo page (https://github.com/denehyg/reveal.js-menu/blob/gh-pages/index.html).

Note that there’s a typo in the menu plugin readme where you got this. If you’ve put menu plugin in the plugins (with an ‘s’) folder then the script tag needs to point that folder. The example you’ve copied above points to the plugin (without an ‘s’) folder. I’ll have to fix the docs.

drfurtado commented 3 years ago

Thanks a lot for the quick response. I was trying to avoid using the old version. My dilemma is that I want to use markdown to create my slides since it is less time consuming for me. The way I understand it, every time I "knit" (render) the file, the HTML is rebuilt. So, adding the script to the HTML is not an option, at least as I understand it. I wish there was a workaround for it.

denehyg commented 3 years ago

If you’re up for it you might be able to fork the rstudio/revealjs repo and update the libraries in the inst folder. Just note that to use the current version of revealjs-menu you’ll also need to update revealjs to v4.