最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】gitbook中安装multipart插件

gitbook crifan 5123浏览 0评论

折腾:

【部分解决】Gitbook中添加多章节且希望一级章节也显示编号

期间,参考:

编辑书籍 | GitBook 简明教程

multipart | GitBook 简明教程

-》

gitbook-plugin-multipart

去安装试试:

➜  htttp_summary git:(master) npm install gitbook-plugin-multipart -g

npm WARN deprecated [email protected]: the module is now available as ‘css-select’

npm WARN deprecated [email protected]: the module is now available as ‘css-what’

+ [email protected]

added 19 packages in 2.757s

然后:

book.json中配置:

  “plugins”: [

    “-search”,

    “multipart”

  ],

结果:

➜  htttp_summary git:(master) gitbook serve

Live reload server started on port: 35729

Press CTRL+C to quit …

info: 7 plugins are installed

Error: Couldn’t locate plugins “multipart”, Run ‘gitbook install’ to install plugins from registry.

➜  htttp_summary git:(master) ✗ gitbook install multipart

info: nothing to install!

也去看了看help:

➜  htttp_summary git:(master) gitbook help

    build [book] [output]       build a book

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

        –format                Format to build to (Default is website; Values are website, json, ebook)

        –[no-]timing           Print timing debug information (Default is false)

    serve [book] [output]       serve the book as a website for testing

        –port                  Port for server to listen on (Default is 4000)

        –lrport                Port for livereload server to listen on (Default is 35729)

        –[no-]watch            Enable file watcher and live reloading (Default is true)

        –[no-]live             Enable live reloading (Default is true)

        –[no-]open             Enable opening book in browser (Default is false)

        –browser               Specify browser for opening book (Default is )

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

        –format                Format to build to (Default is website; Values are website, json, ebook)

    install [book]              install all plugins dependencies

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

    parse [book]                parse and print debug information about a book

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

    init [book]                 setup and create files for chapters

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

    pdf [book] [output]         build a book into an ebook file

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

    epub [book] [output]        build a book into an ebook file

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

    mobi [book] [output]        build a book into an ebook file

        –log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

继续参考:

插件 | GitBook文档(中文版)

去在book.json中配置好的情况,直接:

gitbook install

试试

➜  htttp_summary git:(master) gitbook install

info: installing 1 plugins using [email protected]

info:

info: installing plugin “multipart”

info: install plugin “multipart” (*) from NPM with version 0.3.0

/Users/crifan/GitBook/Library/Import/htttp_summary

└─┬ [email protected]

  └─┬ [email protected]

    ├─┬ [email protected]

    │ ├── [email protected]

    │ └── [email protected]

    ├─┬ [email protected]

    │ └── [email protected]

    ├── [email protected]

    ├─┬ [email protected]

    │ ├── [email protected]

    │ ├── [email protected]

    │ ├── [email protected]

    │ ├── [email protected]

    │ └─┬ [email protected]

    │   ├── [email protected]

    │   ├── [email protected]

    │   ├── [email protected]

    │   └── [email protected]

    └── [email protected]

info: >> plugin “multipart” installed with success

果然可以了。

然后再去看看multipart的效果

问题依旧。

【总结】

此处安装gitbook的multipart插件的方法是:

1.先去book.json中配置加上

<code>  "plugins": [
    "multipart"
</code>

  ]

2.再去gitbook install即可安装

安装完成会显示:

info: >> plugin “multipart” installed with success

转载请注明:在路上 » 【已解决】gitbook中安装multipart插件

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.194 seconds, using 22.07MB memory