I have this
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.4.1/js/reveal.min.js"></script>
<script>
Reveal.initialize({
dependencies: [
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.4.1/plugin/highlight/highlight.min.js', async: true, callback:() => hljs.initHighlightingOnLoad() },
]
});
Which is giving me an error
reveal.js:382 Uncaught ReferenceError: head is not defined
from inside the load > loadScript function.
Really confused by this...
@togakangaroo I came across this just now while having the same issue.
I added a direct reference to head.min.js (path: {revealJS root}\lib\js\head.min.js). So, just under where I reference reveal.js itself. This resolved the issue for me.
It seems there's an assumption on the part of some plugins that head.min.js is already loaded.
This might be worth filing as an issue or noting somewhere in the docs.
There's a note about head.js being required in https://github.com/hakimel/reveal.js#dependencies.
I did this to myself by using joe to generate a .gitignore for a Python project, which resulted in reveal.js's lib subdirectory being excluded (and therefore never pushed to GitHub).
You might want to鈥攁s a sanity check鈥攎ake sure those files actually ended up on GitHub when you pushed. It's deceiving, because it'll work when you grunt serve or whatever on your local end, but it won't work when you try to view the reveal.js slides with GitHub Pages.
Thanks @ernstki, I had exactly the same problem. Working Reveal slide deck on my local, but broken on gh-pages. I also found a .gitignore file in my repo that had ignored *.min.hs preventing my head js file from being included. Thanks for pointing this out, I'm not sure how long I'd have stared at it without this tip ;)