gitbook serve fail
$ gitbook -V
CLI version: 2.3.0
GitBook version: 3.2.2
$ gitbook serve ./ --debug
Live reload server started on port: 35729
Press CTRL+C to quit ...
info: 16 plugins are installed
info: 14 explicitly listed
info: loading plugin "splitter"... OK
info: loading plugin "github"... OK
info: loading plugin "prism"... OK
info: loading plugin "expandable-chapters"... OK
info: loading plugin "anchors"... OK
info: loading plugin "anchor-navigation-ex"... OK
info: loading plugin "advanced-emoji"... OK
info: loading plugin "bootstrap-callout"... OK
info: loading plugin "livereload"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 8 pages
info: found 11 asset files
Failed to load prism syntax: javasrcipt
{ Error: Cannot find module 'prismjs/components/prism-javasrcipt.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.code (f:\note\gitbook\vue-note\node_modules\gitbook-plugin-prism\index.js:64:11)
at Record.TemplateBlock.applyBlock (C:\Users\Administrator\.gitbook\versions\3.2.2\lib\models\templateBlock.js:205:23)
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\getModifiers.js:56:33
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\modifiers\highlightCode.js:47:24
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\modifiers\editHTMLElement.js:11:16
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\utils\promise.js:36:16 code: 'MODULE_NOT_FOUND' }
Failed to load prism syntax: javasrcipt
{ Error: Cannot find module 'prismjs/components/prism-javasrcipt.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.code (f:\note\gitbook\vue-note\node_modules\gitbook-plugin-prism\index.js:64:11)
at Record.TemplateBlock.applyBlock (C:\Users\Administrator\.gitbook\versions\3.2.2\lib\models\templateBlock.js:205:23)
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\getModifiers.js:56:33
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\modifiers\highlightCode.js:47:24
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\output\modifiers\editHTMLElement.js:11:16
at C:\Users\Administrator\.gitbook\versions\3.2.2\lib\utils\promise.js:36:16 code: 'MODULE_NOT_FOUND' }
info: >> generation finished with success in 9.4s !
Starting server ...
Serving book on http://localhost:4000
What does your markdown look like? It appears there is a typo of some kind: javascript should not be spelled javasrcipt. Can you check if there is a typo?
javascript 的确写错了。我的错。以前没事来着,今天再运行就不行了。所以很郁闷
Hi, how did you solve it?
Hi, how did you solve it?
javasrcipt -> javascript
Hi, how did you solve it?
javasrcipt -> javascript
Where to change the file
Hi, how did you solve it?
javasrcipt -> javascript
Where to change the file
Code usage, ** ```javascript **
I see, but I have some yml grammar, and he doesn't have it. What should I do
If there is no solution, check the prismjs website to see if it supports yml or yaml;
Or you can ditch gitbook and build with vuepress, which I'm currently using, which supports
If there is no solution, check the prismjs website to see if it supports yml or yaml;
Or you can ditch gitbook and build with vuepress, which I'm currently using, which supports
Oh, I see. I changed yml to yaml. That solved the problem
But it does not support shell writing, should I use ' 'bash' 'instead of' ' 'shell' '?
https://prismjs.com/#supported-languages
Refer to this supported language
i can't use vuepress, i'm use gitbook+prism
谢谢你的回答,我基本清楚了!
-_-||,你会中文
我江西人,本来以为你是外国友人的,后面去了你的主页看了你的几个仓库才知道你是国人,哈哈
我想问下,gitbook支持 vuepress 吗?我该怎么使用?
我在想我是不是可以自己写个prism-shell.js,参考它prism-bash.js 的写法,这样不就可以支持shell的写法了,我看Markdown语法是支持shell的代码块的啊
vuepress 是和 gitbook 类似的网站生成工具。
这个就是用 vuepress 1.x 渲染的网站 https://zq99299.github.io/note-book/
关于 vuepress 的使用你可以看这里 https://zq99299.github.io/note-book/introduce/vue-press.html#%E5%88%9D%E4%BD%93%E9%AA%8C
由于我上面写的笔记中的文章是写的 0.x 的版本,现在已经 1.x 了,可以去看官网 https://v1.vuepress.vuejs.org/zh/ 看官网文档。
gitbook 放弃了离线版本,我也就转向使用 vuepress 生成网站 ,atom 进行书写
What does your markdown look like? It appears there is a typo of some kind:
javascriptshould not be spelledjavasrcipt. Can you check if there is a typo?
Hi,I am wondering if I can write prism-shell.js by myself, referring to the writing method of prism-bash.js, so as not to support the writing method of shell, I think Markdown grammar is the code block that supports shell
vuepress 是和 gitbook 类似的网站生成工具。
这个就是用 vuepress 1.x 渲染的网站 https://zq99299.github.io/note-book/
关于 vuepress 的使用你可以看这里 https://zq99299.github.io/note-book/introduce/vue-press.html#%E5%88%9D%E4%BD%93%E9%AA%8C
由于我上面写的笔记中的文章是写的 0.x 的版本,现在已经 1.x 了,可以去看官网 https://v1.vuepress.vuejs.org/zh/ 看官网文档。
gitbook 放弃了离线版本,我也就转向使用 vuepress 生成网站 ,atom 进行书写
嗯嗯,好的,谢谢你!