1.7 gitbook 插件等相关设置
Last updated
Last updated
本文记录了1.7 gitbook 插件等相关设置,解决gitbook不支持latex公式等问题。
文章同步于: 我的gitbook
在你gitbook更目录中编辑book.json文件,文件配置好后,不会生效,需要先执行命令
然后执行如下命令进行编译
图和流程图(甘特图之类的)
Mermaid 的 plugins地址, Mermaid 的github地址
安装方法,在book.json加入以下内容,然后gitbook install
{ "plugins": ["mermaid"] }
graph TD; A-->B; A-->C; B-->D; C-->D;
classDiagram Class01 <|-- AveryLongClass : Cool Class03 -- Class04 Class05 o-- Class06 Class07 .. Class08 Class09 --> C2 : Where am i? Class09 -- C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla Class08 <--> C2: Cool label
具体使用帮助文档请移步github
为了支持数学公式, 我们可以使用KaTex和MathJax插件, 官网上说Katex速度要快于MathJax
用法:
Install Add the below to your book.json file, then run gitbook install :
Usage Currently, This plugin support:
Bilibili Youku Iqiyi QQ Sohu Mgtv PPTV There are each methods which you should use to insert matched website's video.
Tips:
[xxx] is optional parameter. You can ignore it but don't ignore any @. The width x height, which is defined by you, is the largest size of the player and if you have a small screen to look through the page, Page will zoom the player with the scale of your width x height. Bilibili html5 https
avCode is bilibili video's serial number. Just like this: https://www.bilibili.com/video/av 170001
avCode should be a number. Don't attach "av" to it.
section is matched video's sub video's serial number.
width x height is player's size.
Youku html5 flash https
mode is player's mode. js(html5) or flash.
videoCode just like this: https://v.youku.com/v_show/id_ XNDU4MjQ3MzA0 .html
width x height is player's size.
Iqiyi html5 flash https(HTML5 player) http(Flash player)
Iqiyi's parameter just like shit!!!
Flash player
flash is key word. Don't change it.
You only can visit Iqiyi's video's Sharing page and copy its HTML to get these parameters. It just like this: