dapeng avatar

将幻灯忍者 xaringan 幻灯片发布到网上的方法

dapeng

Published: 21 Nov 2018 › Updated: 21 Nov 2018将幻灯忍者 xaringan 幻灯片发布到网上的方法

将幻灯忍者 xaringan 幻灯片发布到网上的方法

xaringan 做的幻灯片发布到网上的好处有很多,例如凡有网处皆可访问,例如每页幻灯片都有个固定网址方便引用等等。

发布到网上的方法有很多种,简单做个笔记:

Github 法

将 xaringan 制作的一个幻灯片的文件夹(简称幻灯片文件夹)作为一个 repo 发布到 GitHub,然后在该 repo 的settings 里开启 page 功能,就可以用 your_id.github.io/your_repo 来访问幻灯片了。

示例:https://pzhaonet.github.io/mindr-slides

参考:https://github.com/yihui/xaringan/wiki/Deploy-Slides-Online

Hugo + netlify 法

如果你有个 Hugo 静态网站并由洋雷锋 netlify 托管(例如本站),那就可以将幻灯片文件夹直接放到 Hugo 网站的 static 文件夹里即可。netlify 自动部署后,访问 your_domain/your_xaringan 就行了。

示例:http://www.pzhao.org/slides/mindr

Dropbox + Updog 法

这个我只是听说,没有亲手操作过。

参考:https://community.rstudio.com/t/posting-xaringan-presentation-on-blogdown/8212/7

用上面这些方法中的任意一个完成后,可以将幻灯片嵌入博客帖子里,如本文开头所示,方法是在 blogdown 的帖子里加入:

knitr::include_url('hyperlink_to_your_slides')

参考:https://timmastny.rbind.io/blog/embed-slides-knitr-blogdown/

有种预感:三国群雄割据的局面快结束了,魏晋的风流时代即将来临……

Leave 将幻灯忍者 xaringan 幻灯片发布到网上的方法 to:

Written by

悄然拂袖去 ,不携一片云。

Read more #cn posts


Best Posts From dapeng

We have not curated any of dapeng's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From dapeng