Skip to main content
 首页 » 编程设计

python之如何在 GitHub 页面上托管 iPython nbconvert 幻灯片

2025年05月04日10Leo_wl

我正在尝试在 GitHub 页面上托管我的 iPython 幻灯片,并以幻灯片形式公开提供。我使用以下方法创建了幻灯片:

jupyter nbconvert make_presentation.ipynb --to slides --post serve 

它创建了 make_presentation.slides.html。幻灯片按预期在本地运行良好。我配置了一个新的 GitHub 存储库,它成功地提供了 Reveal.js 测试页面:http://richardafolabi.github.io/Presentation_js/index.html

但是,一旦在 GitHub 页面上,我的幻灯片只显示静态 html 页面而不是幻灯片:http://richardafolabi.github.io/Presentation_js/make_presentation.slides.html

index.html 和make_presentation.slides.html 都在同一目录级别。

有人知道为什么我的幻灯片可以在本地工作但不能远程工作吗? iPython 幻灯片还有哪些其他托管选项?

请您参考如下方法:

问题是 reveal.js Assets 的路径。您正在尝试加载:

http://richardafolabi.github.io/Presentation_js/reveal.js/js/reveal.js

但正确的路径是:

http://richardafolabi.github.io/Presentation_js/js/reveal.js

尝试更改所有 Assets 的路径,它将起作用;-) 删除所有 Assets 的“reveal.js/”。

或者更改 Assets 文件夹,也许更快。