折腾:
【记录】gitbook换用更好看的hint callout提示
期间,去升级新版试试,看看是否支持好看的hint:
并且:
“Learn what is new, and what no longer exists, compared to the previous version of GitBook at legacy.gitbook.com”
指的是:
之前gitbook的book都放在了:
现在升级新版了,换了地址了。
“This is the documentation for the new version of the GitBook platform.”
新地址看起来是:
-》上面好看的hint只是:
上的效果。
不是gitbook的CLI命令行工具所支持的。
另外:
https://docs.gitbook.com/what-is-new/important-differences#cli-toolchain
“We have moved away from the static site generator model, and no longer use the famous gitbook CLI to build documentation output.”
https://github.com/GitbookIO/gitbook
已经不用这个gitbook命令行工具了。。。
而之前无意间看到有人讨论:
Is GitBook still alive? · Issue #1808 · GitbookIO/gitbook
好像最近gitbook都不更新了。。。
难道没人维护了?
“* Editor now natively supports editing rich content (hints, embeds, api methods, …), no longer requires a templating syntax !”
新版的Editor编辑器(web版的?还是桌面端的?)
-》打开:
也会自动跳转到:
GitBook
看来是新版升级好了:
GitbookIO/gitbook: 📝 Modern documentation format and toolchain using Git and Markdown
看了下,最新一次commit是2个月前 -》 说明还是alive的
Plugins · GitBook Toolchain Documentation
Installation and Setup · GitBook Toolchain Documentation
先看看当前版本:
<code>➜ Import gitbook --version CLI version: 2.3.2 GitBook version: 3.2.3 ➜ Import which gitbook /usr/local/bin/gitbook </code>
去升级一下gitbook
<code>➜ Import npm install gitbook-cli -g /Users/crifan/.nvm/versions/node/v10.4.0/bin/gitbook -> /Users/crifan/.nvm/versions/node/v10.4.0/lib/node_modules/gitbook-cli/bin/gitbook.js + [email protected] added 578 packages from 672 contributors in 13.818s ➜ Import which gitbook /usr/local/bin/gitbook ➜ Import gitbook --version CLI version: 2.3.2 GitBook version: 3.2.3 </code>
结果好像没有更新。
打算重新去下载gibbook的editor
不过看到了,可以安装新beta版本:
<code>➜ Import gitbook ls-remote Available GitBook Versions: 4.0.0-alpha.6, 4.0.0-alpha.5, 4.0.0-alpha.4, 4.0.0-alpha.3, 4.0.0-alpha.2, 4.0.0-alpha.1, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.2.0-pre.1, 3.2.0-pre.0, 3.1.1, 3.1.0, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-pre.15, 3.0.0-pre.14, 3.0.0-pre.13, 3.0.0-pre.12, 3.0.0-pre.11, 3.0.0-pre.10, 3.0.0-pre.9, 3.0.0-pre.8, 3.0.0-pre.7, 3.0.0-pre.6, 3.0.0-pre.5, 3.0.0-pre.4, 3.0.0-pre.3, 3.0.0-pre.2, 3.0.0-pre.1, 2.6.7, 2.6.6, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.5.0-beta.7, 2.5.0-beta.6, 2.5.0-beta.5, 2.5.0-beta.4, 2.5.0-beta.3, 2.5.0-beta.2, 2.5.0-beta.1, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.0, 2.1.0, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-beta.5, 2.0.0-beta.4, 2.0.0-beta.3, 2.0.0-beta.2, 2.0.0-beta.1, 2.0.0-alpha.9, 2.0.0-alpha.8, 2.0.0-alpha.7, 2.0.0-alpha.6, 2.0.0-alpha.5, 2.0.0-alpha.4, 2.0.0-alpha.3, 2.0.0-alpha.2, 2.0.0-alpha.1 Tags: latest : 3.2.3 pre : 4.0.0-alpha.6 ➜ Import gitbook fetch beta Error: Invalid version or tag "beta", see available using "gitbook ls-remote" ➜ Import gitbook fetch 4.0.0-alpha.6 Installing GitBook 4.0.0-alpha.6 [fsevents] Success: "/private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-25444JRjdwNavof3d/node_modules/gitbook/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed Pass --update-binary to reinstall or --build-from-source to recompile [fsevents] Success: "/private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-25444JRjdwNavof3d/node_modules/gitbook/node_modules/nunjucks/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed Pass --update-binary to reinstall or --build-from-source to recompile [email protected] ../../../../../var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-25444JRjdwNavof3d/node_modules/gitbook ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) └── [email protected] GitBook 4.0.0-alpha.6 has been installed </code>
gitbook 新版
“1. CLI 工具链
移除了静态站点生成器,并且不再使用着名的 gitbook CLI 来构建文档输出。”
那岂不是:
不要安装新版了,否则连gitbook的cli都用不了了?
“4. PDF 和其他电子书格式出口
新版本的 GitBook 不再支持导出为 PDF 和其他电子书格式。
5. 离线访问
将来可能会实现离线访问功能。
7. 桌面编辑器
新版本不再有桌面编辑器。我们将团队注意力集中在网络应用和编辑器上,以确保产品的最佳质量。但是如果你的空间被同步到一个 GitHub 仓库,你仍然可以用你喜欢的编辑器编辑仓库。
8. 插件
一些传统的插件,例如 youtube,hint,theme-api 仍然被支持并作为一流功能提供。但大多数传统插件不再受支持。
放弃book提出space的概念,不支持pdf导出,只有企业级用户可以导出,这点除了他想收钱之外我想不出别的原因了,提出book的概念,但是不让导出book,尤其是最重要的pdf功能,这就是个笑话,
”
所以,放弃升级新版本
不过此处已经安装了新版,先去看看:
gitbook的命令行工具,是否还能用
<code>➜ Import which gitbook /usr/local/bin/gitbook ➜ Import gitbook --version CLI version: 2.3.2 GitBook version: 3.2.3 </code>
好像还是在的啊
关闭重新打开终端,发现gitbook还在,只是位置变了:
<code>➜ Import which gitbook /Users/crifan/.nvm/versions/node/v10.4.0/bin/gitbook ➜ Import gitbook --version CLI version: 2.3.2 GitBook version: 3.2.3 </code>
然后去打开gitbook editor看看,好像没变化,还是旧版本的:
那就正好,暂时不去升级新版本了。
有需要,再去升级。
【总结】
此处虽然命令行中升级了gitbook,貌似没有成功。
然后gitbook的cli还是旧版本,editor也是旧版本。
而由于新版本很多问题和限制,所以暂时正好不升级新版,有机会和需要再去升级。
【后记20181211】
参考:
GitbookIO/gitbook-cli: GitBook’s command line interface
去升级:
<code>➜ resources git:(master) ✗ gitbook --version CLI version: 2.3.2 GitBook version: 3.2.3 ➜ resources git:(master) ✗ gitbook update Installing GitBook 2.6.9 / </code>
等待了好一会,终于升级完了:
<code>➜ resources git:(master) ✗ gitbook update Installing GitBook 2.6.9 SOLINK_MODULE(target) Release/.node CXX(target) Release/obj.target/fse/fsevents.o In file included from ../fsevents.cc:85: ../src/methods.cc:14:12: warning: 'Call' is deprecated [-Wdeprecated-declarations] handler->Call(3, argv); ^ ../node_modules/nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../node_modules/nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ 1 warning generated. SOLINK_MODULE(target) Release/fse.node [email protected] ../../../../../../../../../../../var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-5812UoKKu3vpC9mM/node_modules/gitbook ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) GitBook has been updated to 2.6.9 ➜ resources git:(master) ✗ </code>
再去看看版本:
<code>➜ resources git:(master) ✗ gitbook -V CLI version: 2.3.2 GitBook version: 3.2.3 </code>
结果还是之前版本2.3.2啊。
去看看远程版本:
<code>➜ resources git:(master) ✗ gitbook ls-remote Available GitBook Versions: 4.0.0-alpha.6, 4.0.0-alpha.5, 4.0.0-alpha.4, 4.0.0-alpha.3, 4.0.0-alpha.2, 4.0.0-alpha.1, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.2.0-pre.1, 3.2.0-pre.0, 3.1.1, 3.1.0, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-pre.15, 3.0.0-pre.14, 3.0.0-pre.13, 3.0.0-pre.12, 3.0.0-pre.11, 3.0.0-pre.10, 3.0.0-pre.9, 3.0.0-pre.8, 3.0.0-pre.7, 3.0.0-pre.6, 3.0.0-pre.5, 3.0.0-pre.4, 3.0.0-pre.3, 3.0.0-pre.2, 3.0.0-pre.1, 2.6.9, 2.6.8, 2.6.7, 2.6.6, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.5.0-beta.7, 2.5.0-beta.6, 2.5.0-beta.5, 2.5.0-beta.4, 2.5.0-beta.3, 2.5.0-beta.2, 2.5.0-beta.1, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.0, 2.1.0, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-beta.5, 2.0.0-beta.4, 2.0.0-beta.3, 2.0.0-beta.2, 2.0.0-beta.1, 2.0.0-alpha.9, 2.0.0-alpha.8, 2.0.0-alpha.7, 2.0.0-alpha.6, 2.0.0-alpha.5, 2.0.0-alpha.4, 2.0.0-alpha.3, 2.0.0-alpha.2, 2.0.0-alpha.1 Tags: latest : 2.6.9 pre : 4.0.0-alpha.6 </code>
然后ls:
<code>➜ resources git:(master) ✗ gitbook ls GitBook Versions Installed: * 4.0.0-alpha.6 3.2.3 2.6.9 Run "gitbook update" to update to the latest version. </code>
-》现在感觉是:
之前
<code>CLI version: 2.3.2 GitBook version: 3.2.3 </code>
就是:
Gitbook 版本已经是:3.2.3
不过CLI命令行工具是:2.3.2
而已。
此处去update后,显示是更新到了2.6.9,但是比之前的3.2.3还低
所以实际上没有update成功。
所以:此处继续用3.2.3,然后也不用再去update了。
转载请注明:在路上 » 【记录】gitbook升级到新版本