partageit / markdown-to-slides

A command line interface to convert markdown documents to an HTML slideshow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remark.js script not loaded with https

jayqi opened this issue · comments

The link to load remark.js is http and not https. This can prevent the javascript from loading if the page is served with https, as modern browsers often block scripts in this situation.

Chrome 60.0.3112.90 on macOS:

Mixed Content: The page at 'https://jayqi.github.io/civic-data-tutorials/overview-of-data-analysis-tools/overview-of-data-analysis-tools-slides.html' was loaded over HTTPS, but requested an insecure script 'http://remarkjs.com/downloads/remark-latest.min.js'. This request has been blocked; the content must be served over HTTPS.

Okay, looked at this again, and it seems like markdown-to-slides was writing the link with https but the problem is with the choice of remark.min.js host. The URL being used is

https://gnab.github.io/remark/downloads/remark-latest.min.js

but I think because of SSL issues with GitHub pages, it was not flying with Chrome. It works fine if you replace it with a link to a real CDN, like cdnjs:

https://cdnjs.cloudflare.com/ajax/libs/remark/0.14.0/remark.min.js

Using the above cdnjs-hosted URL worked for me without issue.

This was also discussed here: gnab/remark#183