Unable to transform reveal slides usign reveal.js-menu with docker
jpggithub opened this issue · comments
Hi
I have some reveal.js presentations in a hugo+gitlab environment.
I'm unable to transform presentations that use reveal.js-menu. The plugin is in a folder of my hugo website tree.
Locally, everything is fine. I can see the presentation into a browser and I can transform it with
npx decktape http://localhost:1313/slides/test/index.html ~/Desktop/test.pdf
On my GitLab Pages, the presentation works well and the reveal.js-menu plugin works correctly.
The problem is that I'm not be able to transform the presentation in pdf.
In my .gitlab-ci.yml
I use the docker image astefanutti/decktape
and the following command line:
node /decktape/decktape.js --chrome-path chromium-browser --chrome-arg=--no-sandbox /public/slides/test/index.html "$CI_PROJECT_DIR/public/export/reveal.pdf"
I obtain the following error:
Loading page file:///builds/username/foobar/public/slides/test/index.html ...
Page error: RevealMenu is not defined
Loading page finished with status: 200
Reveal JS plugin isn't compatible with reveal.js version < 2.4.0
No supported DeckTape plugin detected, falling back to generic plugin
Generic plugin activated
Printing slide #1 ( 1/ ?) ...
Printed 1 slides
The presentation is reduced to 1 blank slide instead or 4.
If I delete the reference to RevealMenu
in the Reveal.initialize({ plugins: ....
, I've got no menu but the presentation is correctly transformed in PDF.
I don't understand why decktape can't find the reveal.js-menu
stuff.
Any hints?
Decktape relies on the global Reveal
variable and expect it to exist, as documented in https://revealjs.com/initialization/.
That being said, I've tested it by exporting the demo presentation from https://denehyg.github.io/reveal.js-menu and it works:
test.pdf.
Seeing the message you have:
Reveal JS plugin isn't compatible with reveal.js version < 2.4.0
It may be caused by a version that's too old.
Thanks for testing decktape with reveal.js-menu!
The good news it that there is a way to have reveal.js-menu functionning with dectape.
The bad news it that I use Reveal 5.0.1 so I don't understand why I have the message above speaking of reveal.js version < 2.4.0.
More than that, my slides work very well on my Gitlab Pages with reveal.js-menu. The only problem is to make decktape working with this configuration :/