代码拉取完成,页面将自动刷新
一个Demo,利用 jsvine/notebookjs
在VUE中展示 ipynb
文件,并作代码高亮。
Demo to view a .ipynb
(python notebook) file with VUE.
npm install marked ansi_up dompurify jsdom
npm install prismjs
npm install babel-plugin-prismjs
Config .babelrc
file of your VUE project
{
"plugins": [
[
"prismjs",
{
"languages": ["html", "css", "javascript", "python"],
"plugins": ["line-numbers"]
}
]
]
}
Copy this files to project:
npm install
npm run serve
view: http://localhost:8080/
Many thanks to the following users for catching bugs, fixing typos, and proposing useful features: https://github.com/jsvine/notebookjs https://prismjs.com/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。