gdi-intro-python icon indicating copy to clipboard operation
gdi-intro-python copied to clipboard

Set2 slides don't load in reveal.js properly

Open dtabacco opened this issue 10 years ago • 7 comments

I downloaded the git project was able to run the set1 slides no problem from localhost:8000. When I click on the set2 slides, there are these characters at the bottom of the page "@@@" and I can't arrow through the slides.

dtabacco avatar Aug 27 '15 20:08 dtabacco

Hey @dtabacco, Sorry for the delayed reply.

I'd like to take a moment and dig into this for you at some point. This sounds like the markdown add-on feature for reveal is not working. The set1 slides are HTML, and starting with set2, I started using Markdown to make content editting a bit easier. It does make the setup a bit more involved. I can't remember the specifics of what all can make it fail. One is using file:/// as opposed to a local server, because it needs cross-origin to load the markdown file in dynamically.

Maybe this points you in the right direction, or at least a starting place. Hope this helps

calebsmith avatar Sep 08 '15 16:09 calebsmith

Oh, just a quick note. When we get it figured out, we should update the setup in README so the next person doesn't run into this.

calebsmith avatar Sep 08 '15 16:09 calebsmith

I did a little digging and ran into the same conclusion that its the .md set that doesn't work. I experienced this problem when running on Windows, but when I tried on my Mac, it works fine. In both cases I was running them from http://localhost:8000 after launching server.py. I don't know how the reveal.js library works, but could it be related to the Windows path '' vs the Linux path '/'?

dtabacco avatar Sep 10 '15 02:09 dtabacco

Glad you got it working at least in one case.

That sounds pretty likely. I'm really not sure what all the differences could be that would cause Windows to not work, but that's certainly the biggest.

calebsmith avatar Sep 10 '15 13:09 calebsmith

I found the issue: https://github.com/hakimel/reveal.js/issues/929

Added the following line in the markdown.js slidify function fixes the problem on windows: markdown = markdown.replace(/(\r\n|\r)/g, '\n');

I haven't tested yet to see if this works on unix systems.

Wish there was a better solution for cross-compatibility than modifying an included library.

dtabacco avatar Sep 10 '15 17:09 dtabacco

For sure. All of this makes me think about using landslide. It does roughly the same thing as reveal, but it runs the build of the HTML from the markdown as a command line program, and doesn't load the files in dynamically. Each approach has drawbacks, but I've found it to be a lot more reliable in general.

Of course, changing this project over to landslide is a significant undertaking.

If it helps, I've usually just developed these on Linux, and then had folks use the github.io hosted slides for viewing. I suppose this is why I never noticed the reveal.js problems on windows.

calebsmith avatar Sep 10 '15 17:09 calebsmith

That was my plan, I just wanted a backup method in the event that the Internet was not accessible at one of the teaching locations.

I don't think it's urgent. Between using the web slides and bringing my Mac, I'll be able to run them. If I need to use Windows, I have my local fix now.

dtabacco avatar Sep 10 '15 18:09 dtabacco