GitBook的使用备忘
GitBook环境搭建
npm install -g gitbook-cli
# 新建目录,如helloworld
cd helloworld
# 执行此语句,需等待一段时间
gitbook init
# 启动服务
gitbook serve
遇到问题
TypeError: cb.apply is not a function
问题描述
在执行gitbook init时,出现此问题
解决办法:
- 修改相应的文件,可参考:https://www.jianshu.com/p/6221330b36ba
- 调整nodejs的版本,本人将nodejs调整到10.23.0,可以安装成功
nodejs版本的切换
本人使用的windows系统,切换nodejs版本用到了一个nvm的工具,它可以很方便的安装及切换nodejs的版本。
可参考文档:使用nvm安装不同版本的NodeJS
GitBook应用备忘
如何隐藏底部链接Published with GitBook
参考文档
https://www.jianshu.com/p/23353e771082
操作步骤
1、新建文件
_layouts\website\summary.html
2、编辑文件
{% macro articles(_articles) %}
{% for article in _articles %}
<li class="chapter {% if article.path == file.path and not article.anchor %}active{% endif %}" data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|resolveFile }}"{% endif %}>
{% if article.path and getPageByPath(article.path) %}
<a href="{{ article.path|resolveFile }}{{ article.anchor }}">
{% elif article.url %}
<a target="_blank" href="{{ article.url }}">
{% else %}
<span>
{% endif %}
{% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
<b>{{ article.level }}.</b>
{% endif %}
{{ article.title }}
{% if article.path or article.url %}
</a>
{% else %}
</span>
{% endif %}
{% if article.articles.length > 0 %}
<ul class="articles">
{{ articles(article.articles, file, config) }}
</ul>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
<ul class="summary">
{% set _divider = false %}
{% if config.links.sidebar %}
{% for linkTitle, link in config.links.sidebar %}
{% set _divider = true %}
<li>
<a href="{{ link }}" target="_blank" class="custom-link">{{ linkTitle }}</a>
</li>
{% endfor %}
{% endif %}
{% if _divider %}
<li class="divider"></li>
{% endif %}
{% for part in summary.parts %}
{% if part.title %}
<li class="header">{{ part.title }}</li>
{% elif not loop.first %}
<li class="divider"></li>
{% endif %}
{{ articles(part.articles, file, config) }}
{% endfor %}
</ul>
GitBook的使用备忘的更多相关文章
- GIS部分理论知识备忘随笔
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.高斯克吕格投影带换算 某坐标的经度为112度,其投影的6度带和3度带 ...
- python序列,字典备忘
初识python备忘: 序列:列表,字符串,元组len(d),d[id],del d[id],data in d函数:cmp(x,y),len(seq),list(seq)根据字符串创建列表,max( ...
- Vi命令备忘
备忘 Ctrl+u:向文件首翻半屏: Ctrl+d:向文件尾翻半屏: Ctrl+f:向文件尾翻一屏: Ctrl+b:向文件首翻一屏: Esc:从编辑模式切换到命令模式: ZZ:命令模式下保存当前文件所 ...
- ExtJs4常用配置方法备忘
viewport布局常用属性 new Ext.Viewport({ layout: "border", renderTo: Ext.getBody(), defaults: { b ...
- [备忘] Automatically reset Windows Update components
这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...
- ECMAScript 5(ES5)中bind方法简介备忘
一直以来对和this有关的东西模糊不清,譬如call.apply等等.这次看到一个和bind有关的笔试题,故记此文以备忘. bind和call以及apply一样,都是可以改变上下文的this指向的.不 ...
- MFC通过txt查找文件并进行复制-备忘
MFC基于对话框的Demo txt中每行一个23位的卡号. 文件夹中包含以卡号命名的图像文件.(fpt或者bmp文件) 要求遍历文件夹,找到txt中卡号所对应的图像文件,并复制出来. VC6.0写的. ...
- php 相关模块备忘
在安装php的时候,不管是编译安装: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...
- 『备忘』HttpWebRequest 在 POST 提交时, 标头(Headers)丢失原因
近来研究 HttpWebRequest —— 辅助类完成时,POST JSON数据 总会 丢失标头(Headers). HttpWebRequest POST JSON数据,分如下几步: > 将 ...
- Javascript备忘模式
使用备忘模式,利用了函数的自定义属性,先看一个例子 var test = function (){} test.myAttr = "attr"; 这样,就给test加上了一个自定义 ...
随机推荐
- 6. Texture
Texture 作用:可以将默认的贴图转换为自己想要的贴图类型. Texture Type: 贴图类型 Default: 默认的 Normal map: 法线贴图 Editor GUI and Leg ...
- springboot-maven打包项目
在project 标签内,新增一下内容 <build> <plugins> <!--打包项目--> <plugin> <groupId>or ...
- 清理Linux系统无效的或者损坏的包
参考:解决Linux的 [有1 个软件包没有被完全安装或卸载] 问题 ubuntu中卸载没有安装完全的软件包 Ubuntu安装.基本命令和常见故障处理 1. 1 apt-get insta ...
- SAP HANA:XS Job
5.SAP HANA XS Job XS Job:定义重复执行的后台定期任务: 例如定时执行数据更新到Table的操作,需要使用到XS Job; SAP HANA XS Setting up Sche ...
- (python笔记)python使用JS定位css元素
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import da ...
- VS2022在打开设计器的时候提示某变量未声明或者未赋值
有可能是在属性中直接添加引用的dll文件,导致dll并不能被该文件稳定引用,可以删除引用,重新添加试试
- Springboot+Vue实现短信与邮箱验证码登录
体验网址:http://mxyit.com 示例 1.新增依赖 <!-- 短信服务 --> <dependency> <groupId>com.aliyun< ...
- 前端本地实现分页,利用了antd的分页和数组的切片
html的结构 <a-pagination v-bind="pagination" @change="updatePage" @showSizeChang ...
- C语言的qsort函数
C函数----qsort 函数 qsort()看起来和C++的sort()差不多,但是其实差别很大, qsort的cmp函数,传入的是指针,返回值是int sort的则传入值,返回值是bool 当qs ...
- Neo4j权威指南学习笔记第一章
1.创建图数据库 1.1.创建电影节点 CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to ...