plug-in custom functions, parameters, rounding

Configuration of this plug-in supports the following parameters:The configuration shown here is the default configuration

  1. {
  2. "showLevel": true,
  3. "associatedWithSummary": true,
  4. "printLog": false,
  5. "multipleH1": true,
  6. "mode": "float",
  7. "showGoTop":true,
  8. "float": {
  9. "floatIcon": "fa fa-navicon",
  10. "showLevelIcon": false,
  11. "level1Icon": "fa fa-hand-o-right",
  12. "level2Icon": "fa fa-hand-o-right",
  13. "level3Icon": "fa fa-hand-o-right"
  14. },
  15. "pageTop": {
  16. "showLevelIcon": false,
  17. "level1Icon": "fa fa-hand-o-right",
  18. "level2Icon": "fa fa-hand-o-right",
  19. "level3Icon": "fa fa-hand-o-right"
  20. }
  21. }

showLevel : TYPE:boolean。

  1. Whether the title display hierarchy serial number. The page title and title in the navigation will add level display.(controls whether the title of the page is overwritten)
  1. ---- xx.md ---
  2. # h1
  3. ## h2
  4. ### h3
  5. Page effect of the display hierarchy is as follows
  6. 1. h1
  7. 1.1. h2
  8. 1.1.1 h3

associatedWithSummary : TYPE:boolean

The serial number of the page within the summary.md. The md official default theme generated serial number associated with it.

  1. If you open the level display in the default theme website:
  2. "pluginsConfig": {
  3. "anchor-navigation-ex": {
  4. "associatedWithSummary":true
  5. },
  6. "theme-default": {
  7. "showLevel": true
  8. }
  9. }
  10. So write like this:
  11. ----- SUMMARY.md ------
  12. # Summary
  13. * [安装](chapter/install.md)
  14. * [命令](chapter/command.md)
  15. * [配置](chapter/bookjson.md)
  16. * [插件](chapter/plugin.md)
  17. * [prismjs 代码高亮](chapter/plugin/prismjs.md)
  18. * [ace 代码高亮编辑](chapter/plugin/ace.md)
  19. * [navigator 页面导航](chapter/plugin/navigator.md)
  20. ----- chapter/redis/cluster.md ------
  21. # redis集群的准备
  22. ## zlib
  23. 1. 安装redis-cluster依赖:redis-cluster的依赖库在使用时有兼容问题,在reshard时会遇到各种错误,请按指定版本安装.
  24. 2. 确保系统安装zlib,否则gem install会报(no such file to load -- zlib)
  25. ...

So the result is as follows: image

printLog : TYPE:boolean(V1.0.6+)

Whether to print the processing log is useful in troubleshooting the failure to generate book, and to know which file is wrong As shown below, other plug-ins are used, but only the error messages are printed, and which file is not known. Open this option and you’ll see image

multipleH1 : TYPE:boolean(V1.0.6+)

Is it a multi H1 mode? A normal book. One chapter has only one H1 tag, that is, a MD file and a label. If your books are in this normal mode, close this option, =false The biggest difference is as follows

  1. ---- multipleH1=true----
  2. # 多H1标题1
  3. ## 子标题
  4. # 多H1标题2
  5. ## 子标题
  6. ## 子标题
  7. 生成的标题如下:
  8. 1. H1标题1
  9. 1.1. 子标题
  10. 2. H1标题2
  11. 2.1. 子标题
  12. 2.2. 子标题
  13. ---- multipleH1=false----
  14. # 多H1标题1
  15. ## 子标题
  16. # 多H1标题2
  17. ## 子标题
  18. ## 子标题
  19. 生成的标题如下:
  20. H1标题1
  21. 1. 子标题
  22. H1标题2
  23. 1. 子标题
  24. 2. 子标题
  25. See the difference? Normal book mode, that is, only one H1 case, the display of the sort number more in line with our needs.

mode

There are three kinds of navigation mode:

  1. float :floating navigation
  2. pageTop : internal at the top of the page navigation
  3. ‘’ : don’t show navigation

float

mode = float The following configuration to take effect

  1. float: { //浮动导航设置
  2. "floatIcon": "fa fa-navicon", // 配置导航图标,如果你喜欢原先的 锚 图标可以配置为 fa-anchor
  3. "showLevelIcon": false, //是否显示层级图标
  4. "level1Icon": "fa fa-hand-o-right", //层级的图标css
  5. "level2Icon": "fa fa-hand-o-right",
  6. "level3Icon": "fa fa-hand-o-right"
  7. }

Icon to use the default theme website to introduce the CSS http://fontawesome.dashgame.com/

pageTop

mode = pageTop The following configuration to take effect

  1. pageTop: {
  2. showLevelIcon: false,
  3. level1Icon: "fa fa-hand-o-right",
  4. level2Icon: "fa fa-hand-o-right",
  5. level3Icon: "fa fa-hand-o-right"
  6. }

showGoTop : TYPE:boolean (V1.0.11+)

The return top button is separated, and the return top button is displayed for true

additional support function

  • Adding <extoc></extoc> tags to a page generates the TOC directory here.
  • in the page to add <! - ex_nonav -> logo, will make this page does not generate suspended navigation

    In the home page, the introduction page and other places can use this function, can block some code, because these places can not load css