• Gitbook命令行速览

    Gitbook命令行速览

    Gitbook是一个命令行工具,使用方法(这里简单介绍):

    本地预览

    1. C:\Users\lenovo> gitbook serve ./图书名称

    输出一个静态网站

    1. C:\Users\lenovo> gitbook build 图书目录 输出目录

    注意:上面win下命令运行所处在的目录必须是写好的gitbook书籍目录前一个,
    可以使用cd..切换,否则建立时会出错,后面会详细讲解

    查看帮助

    C:\Users\lenovo> gitbook help

    1. build [book] [output] build a book
    2. --format Format to build to (Default is website; Values are website, jso
    3. n, ebook)
    4. --log Minimum log level to display (Default is info; Values are debug
    5. , info, warn, error, disabled)
    6. pdf [book] [output] build a book to pdf
    7. --log Minimum log level to display (Default is info; Values are debug
    8. , info, warn, error, disabled)
    9. epub [book] [output] build a book to epub
    10. --log Minimum log level to display (Default is info; Values are debug
    11. , info, warn, error, disabled)
    12. mobi [book] [output] build a book to mobi
    13. --log Minimum log level to display (Default is info; Values are debug
    14. , info, warn, error, disabled)
    15. serve [book] Build then serve a gitbook from a directory
    16. --port Port for server to listen on (Default is 4000)
    17. --lrport Port for livereload server to listen on (Default is 35729)
    18. --watch Enable/disable file watcher (Default is true)
    19. --format Format to build to (Default is website; Values are website, jso
    20. n, ebook)
    21. --log Minimum log level to display (Default is info; Values are debug
    22. , info, warn, error, disabled)
    23. install [book] install plugins dependencies
    24. init [directory] create files and folders based on contents of SUMMARY.m
    25. d