资讯

展开

本地自用gitbook配置过程,含插件列表完整版

作者:快盘下载 人气:

自用gitbook配置过程,记录下来,方便以后再次配置。主要是安装nodejs和配置环境变量。gitbook安装简单,初始化的时候自己都自动下载了。 插件配置都写好了。直接安装下载就可以了。


本地自用gitbook配置过程,含插件列表完整版


wget  http://npm.taobao.org/mirrors/node/latest-v8.x/node-v8.0.0-linux-x86.tar.xz   
tar xvf node-v8.0.0-linux-x86.tar.xz   
mv node-v8.0.0-linux-x86 /usr/local/node

查看备份环境变量文件

cd /etc/profile
cp profile ./profile.bak

修改nodejs环境变量

cat >> /etc/profile <<EOF
export NODE_HOME=/usr/local/nodeexport 
PATH=$PATH:$NODE_HOME/bin:/opt/node_global/bin
export NODE_PATH=$NODE_HOME/lib/node_modules
EOF

使环境变量生效

source /etc/profile

查看版本,安装完成

node -v
npm -v

book.json配置文件,含插件


{
"title":"Linux学习",
"author":"yaoyingle",
"language":"zh-hans",
"plugins":[    
      "-sharing",        
      "livereload",
       "Highlight",
      "-search",
      "search-pro",
      "lunr",
      "fontsettings",
      "theme-default",
      "back-to-top-button",
      "chapter-fold",
      "expandable-chapters-small",
      "code",
      "copy-code-button",
      "splitter",
      "tbfed-pagefooter",
      "popup"
],
    "pluginsConfig": {
         "code": {
            "copyButtons": true
          }
        },
        "insert-logo": {
        "url": "images/logo.png",
        "style": "background: none; max-height: 30px; min-height: 30px"
        },
        "tbfed-pagefooter": {
            "copyright":"Copyright &copy xxxx.com 2017",
            "modify_label": "该文件修订时间:",
            "modify_format": "YYYY-MM-DD HH:mm:ss"
        },
        "styles":{
                "website":"styles/website.css"
    },
    "links" : {
    "sidebar" : {
        "快盘首页" : "https://www.kkpan.com"
    }
}
}

gitboo serve --port=8080  端口你随意。不冲突就可以。


加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!