【问题标题】:How to Host iPython nbconvert slides on GitHub Pages如何在 GitHub 页面上托管 iPython nbconvert 幻灯片
【发布时间】:2016-01-26 13:36:32
【问题描述】:

我正在尝试在 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.htmlmake_presentation.slides.html 都在同一目录级别。

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

【问题讨论】:

    标签: python slideshow jupyter-notebook reveal.js nbconvert


    【解决方案1】:

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

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

    但正确的路径是:

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

    尝试更改所有资产的路径,它会起作用;-) 删除所有资产的'reveal.js/'

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

    【讨论】:

    • 你的意思是我应该从make_presentation.slides.html 中删除/reveal.js/ 吗?这是一个长文件。我将资产移至/reveal.js/,而不是与幻灯片中的/reveal.js/js/reveal.js 保持一致,但问题仍然相同。我也清除了缓存。
    • 你有一个合并请求 ;-)
    • 我确认了merge 请求并且还做了git pull。这是我第一次做 git merge, pull。请让我知道下一步该怎么做。谢谢:)
    • 我刚刚收到了这个错误信息:The page build failed with the following error: The submodule reveal.js` 没有用.gitmodules 文件正确初始化。有关详细信息,请参阅help.github.com/articles/page-build-failed-missing-submodule。`
    • 再试一次,是我的错!我的运行良好viroide.github.io/Presentation_js/…
    猜你喜欢
    • 1970-01-01
    • 2014-07-13
    • 1970-01-01
    • 2020-10-05
    • 2019-05-21
    • 1970-01-01
    • 2022-11-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多