简体   繁体   English

在Github Pages上使用pym.js不起作用

[英]Using pym.js with Github Pages won't work

I'm setting up a Github Pages web page. 我正在建立一个Github Pages网页。 I want to put some interactive charts on this page. 我想在此页面上放置一些交互式图表。 I've made each chart in its own separate HTML file and want to use pym.js to put them on the Github Pages web page. 我已将每个图表制作在其自己的单独HTML文件中,并希望使用pym.js将其放在Github Pages网页上。 On the .md page I have something like this: .md页面上,我有类似以下内容:

<script src="https://pym.nprapps.org/pym.v1.min.js"></script>
<div id="example"></div>
<script type="text/javascript">
    var pymParent = new pym.Parent("whites","{{site.baseurl}}/charts/example.html",{});
</script>

​But only a 404 error page appears in the iframe when I load the page. 加载页面时,iframe中只会显示404错误页面。 (Dunno if this matters, but I'm testing locally by ​running bundle exec jekyll serve ). (Dunno如果这很重要,但是我正在通过运行bundle exec jekyll serve进行本地测试)。 I can open the HTML file in Firefox and see the chart, but pym-ing it fails. 我可以在Firefox中打开HTML文件并查看图表,但无法成功进行。

我项目的根目录缺少charts文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM