calebsmith / gdi-intro-python

gdi-intro-python - Girl Develop It: Intro to Python
http://calebsmith.github.io/gdi-intro-python/#/
18 stars 41 forks source link

Set2 slides don't load in reveal.js properly #9

Open dtabacco opened 9 years ago

dtabacco commented 9 years ago

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.

calebsmith commented 9 years ago

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 commented 9 years ago

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.

dtabacco commented 9 years ago

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 '/'?

calebsmith commented 9 years ago

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.

dtabacco commented 9 years ago

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.

calebsmith commented 9 years ago

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.

dtabacco commented 9 years ago

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.