jupyter通过notedown使用markdown

0 Problem
最近看了下李沐老师的mxnet教程,在使用jupyter的时候打开教程发现全是markdown源文,没有展示markdown格式的文字。

1 Reason
jupyter要通过notedown插件来使用markdown

2 Solution
我浏览的时候教程里的安装指导没有涉及到这一步,而且notedown参考安装的链接已失效。
李沐老师的教学视频中发现了安装方法。

pip install https://github.com/mli/notedown/tarball/master
jupyter notebook --NotebookApp.contents_manager_class='notedown.NotedownContentsManager'


另外,可以通过配置,默认开启notedown插件,这样就不用每次都加这么长的参数了。首先生成配置文件。

jupyter notebook –generate-config 

在配置文件(~/.jupyter/jupyter_notebook_config.py)末尾加入

c.NotebookApp.contents_manager_class = ‘notedown.NotedownContentsManager’



之后就只需要运行jupyter notebook就可以本地访问教程和代码了。

猜你喜欢

转载自www.cnblogs.com/liaohuiqiang/p/9380458.html