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

revealjs output is broken #6408

Closed
mrpg opened this issue May 28, 2020 · 6 comments
Closed

revealjs output is broken #6408

mrpg opened this issue May 28, 2020 · 6 comments

Comments

@mrpg
Copy link

mrpg commented May 28, 2020

pandoc 2.9.2.1 on Arch Linux

git clone https://github.com/hakimel/reveal.js.git
wget https://pandoc.org/demo/SLIDES
pandoc -s --mathjax -i -t revealjs SLIDES -o example16d.html

produces output with the following error messages in Web Developer:

SyntaxError: import declarations may only appear at top level of a module (reveal.js:1)
ReferenceError: Reveal is not defined (example16d.html:75:7)

The example16d.html file itself looks like plain old HTML, with no CSS or JavaScript to speak of. I attach the entire folder to this issue.

I expected to get this.

pandoc-revealjs.tar.gz

@jgm
Copy link
Owner

jgm commented May 28, 2020

The new version of reveal.js changes some paths and breaks pandoc's output. We've made changes in the dev version to work with the latest reveal.js, so try a nightly and see if your issue is fixed already in the master branch.

@ale66
Copy link

ale66 commented May 29, 2020

Hello John thanks a lot for your work on Pandoc, we all owe to you!
I too report reveal not working anymore:

pandoc -t revealjs -s -o myslides.html myslides.md -V revealjs-url=https://revealjs.com

creates an output file myslides.html that is not interpreted at runtime.

@hakimel
Copy link

hakimel commented May 29, 2020

Hey all 👋 The website at https://revealjs.com was recently updated to reveal.js 4.0 so all of the assets were moved. If you swap out https://revealjs.com for https://unpkg.com/[email protected]/ your exports should work again.

pandoc -t revealjs -s -o s.html s.md -V revealjs-url=https://unpkg.com/[email protected]/

@hakimel
Copy link

hakimel commented May 29, 2020

@jgm If you're adding support for reveal.js 4.0 in an upcoming pandoc version, it would be more future-proof to point to a versioned copy of reveal.js on unpkg. For example https://unpkg.com/reveal.js@^4/ should avoid any breaking changes.

@mrpg
Copy link
Author

mrpg commented May 29, 2020

Hey @jgm and @hakimel, thanks a lot. While I can't currently check out the development version of Pandoc due to conflicting or unavailable dependencies on my machine, what @hakimel wrote fixes my issues for now. Again, thanks a million for all you do!

@mrpg mrpg closed this as completed May 29, 2020
@jgm
Copy link
Owner

jgm commented May 30, 2020

@hakimel thanks for the suggestion. I think I'll change that in the defaults.

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

4 participants