-
|
Hello! I've been using Reveal.js for several years and I just downloaded the latest version from https://github.com/hakimel/reveal.js/archive/master.zip, but the demo.html is not opening as a slideshow out of the box. index.html works like it used to, as do the .html files in the examples folder. But the demo doesn't work, nor does an old demo.html file if I copy and paste it from an older download. I guess something has changed, but the installation guide doesn't make it clear what I need to do to make it work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
In reveal.js 6.0 I modernized the code to use a new build system. As part of this, I changed demo.html to use uncompiled asset paths which means that it now requires that you run the a development server ( This was done to make it easier to work on the source code but if it's disrupting peoples workflows I'll consider rolling it back. Here's a fix in the meantime:
<!-- Use the built assets if you want to run reveal.js without a web server -->
<!--
<script src="dist/reveal.js"></script>
<script src="dist/plugin/zoom.js"></script>
<script src="dist/plugin/notes.js"></script>
<script src="dist/plugin/search.js"></script>
<script src="dist/plugin/markdown.js"></script>
<script src="dist/plugin/highlight.js"></script>
-->
<script type="module">
import Reveal from 'reveal.js';
import RevealZoom from 'reveal.js/plugin/zoom';
import RevealNotes from 'reveal.js/plugin/notes';
import RevealSearch from 'reveal.js/plugin/search';
import RevealMarkdown from 'reveal.js/plugin/markdown';
import RevealHighlight from 'reveal.js/plugin/highlight';You should end up with this: <script src="dist/reveal.js"></script>
<script src="dist/plugin/zoom.js"></script>
<script src="dist/plugin/notes.js"></script>
<script src="dist/plugin/search.js"></script>
<script src="dist/plugin/markdown.js"></script>
<script src="dist/plugin/highlight.js"></script>
<script>
// Also available as an ES module, see:
// https://revealjs.com/initialization/
Reveal.initialize({
controls: true,
progress: true,
center: true,
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight],
});
</script> |
Beta Was this translation helpful? Give feedback.
In reveal.js 6.0 I modernized the code to use a new build system. As part of this, I changed demo.html to use uncompiled asset paths which means that it now requires that you run the a development server (
npm install+npm start).This was done to make it easier to work on the source code but if it's disrupting peoples workflows I'll consider rolling it back.
Here's a fix in the meantime: