GitBook

gitbook 入门教程之增强版 edit-link-plus 编辑此页插件

心已入冬 提交于 2019-12-10 17:23:05
> Gitbook plugin add "edit this page" link, and intelligent recognition to Github or Gitlab source repository. 🏠 Homepage Github : https://snowdreams1006.github.io/gitbook-plugin-edit-link-plus/ GitLab: https://snowdreams1006.gitlab.io/gitbook-plugin-edit-link-plus/ Gitee : https://snowdreams1006.gitee.io/gitbook-plugin-edit-link-plus/ Screenshot Usage Step #1 - Update book.json file In you gitbook's book.json file, add edit-link-plus to plugins list. In pluginsConfig , Set base value which is base path to your github or gitlab or other code repo. Trailing slash is NOT required. By default

使用webhook实现代码自动化部署

拈花ヽ惹草 提交于 2019-12-07 13:50:27
需求背景 自己搭建的博客,代码托管到github,心想博客更新那么频繁,每次push代码后都到服务器上手动部署,实在是太麻烦, 于是想到自动化部署,开始的时候只是想通过一个简单的 shell +cron的方法来解决,但是这方法真的太笨了,一点都不 智能 。想到github的webhook,之前只是听说,明白其原理,并没有实操,这次刚好可以亲自体验一把了。具体如下: webhook简介 webhook是一种web回调或者http的push API,是向APP或者其他应用提供实时信息的一种方式。Webhook在数据产生时立即发送数据,也就是你能实时收到数据。这一种不同于典型的API,需要用了实时性需要足够快的轮询。这无论是对生产还是对消费者都是高效的。 Webhook有时也被称为反向API,因为他提供了API规则,你需要设计要使用的API。Webhook将向你的应用发起http请求,典型的是post请求,应用程序由请求驱动。 Webhook模式的主要优点是,当你的应用在等待变化时,无需周期性地调用APIs。 github webhook 工作原理 vps启动一个nodejs进程(webhook),用来监听github仓库的状态; 管理员本地修改代码,然后push到github代码仓库,master分支; webhook监测到master分支的push操作; 触发VPS上部署的脚本

not able to add custom template files in gitbook themes

戏子无情 提交于 2019-12-06 13:59:41
问题 I am trying to create a custom gitbook theme and in that I also want to change the layout so that the book I create using the theme have the layout that I want. I copied the default templates dir in my assests dir of the custom theme and then modified the layout.html and header.html files as I wanted. Then to include the modified template files, I added the following attribute to the index.js file module.exports = { book: { assets: "./assests", templates: { "layout":"templates/layout.html",

使用Gitbook创建文档并导出PDF

ぃ、小莉子 提交于 2019-12-06 02:27:54
导出 PDF 的方式有很多种,之前使用过 马克飞象 的导出功能,不过只是简单的导出并不能添加目录,因为源文件是 markdown 编写的,经过筛选后采用了 gitbook 的方式进行编写文档并且使用 gitbook pdf . 的方式导出为 PDF 文件。 注意:本机需要有 NodeJs 环境。 博客原文: http://blog.yuqiyu.com/use-gitbook-export-pdf.html 环境准备 想要使用 gitbook ,那么我们本机需要进行安装,通过 npm 命令可以很方便的安装。 安装GitBook 通过 npm 的方式进行安装 gitbook 环境,命令如下所示: npm install gitbook -g 安装calibre & ebook-convert 使用 gitbook 的导出功能,需要第三方插件 ebook 的支持,下面针对两种不同的操作系统进行配置环境。 Linux系统 下载地址: https://calibre-ebook.com/download_linux 下载并安装 sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin 配置软链接 sudo ln -s /usr/bin/nodejs

gitbook 自动生成summary文件

走远了吗. 提交于 2019-12-04 06:54:10
gitbook安装参考官方文档: https://toolchain.gitbook.com/setup.html 方案1, julianxhokaxhiu / gitbook-plugin-summary Google基本上用的是 gitbook-plugin-summary https://github.com/julianxhokaxhiu/gitbook-plugin-summary#readme 安装 npm i gitbook-plugin-summary --save 配置book.json { "plugins": [ "summary" ] } 但是我本地mac环境老提示 yugj-mac-book:gitbook2 yugj$ npm i gitbook-plugin-summary --save npm WARN yugj@1.0.0 No description npm WARN yugj@1.0.0 No repository field. 不太了解npm,最后没有处理,后面使用了方案2 方案2, imfly / gitbook-summary github地址: https://github.com/imfly/gitbook-summary 安装 npm install -g gitbook-summary 简单使用: cd /path/to/your

How to modify the font size in GitBook?

怎甘沉沦 提交于 2019-12-03 16:16:52
As the title says, there's a preference called "Edit Configuration" in the GitBook Editor, it says that you should use json to build a book.json . How can I write this file to modify the font size? Having searched it on the web, I hardly found any useful articles. That depends on how you're planning to publish. From the "How to use it" section : Here are the options that can be stored in this file: { // ... // Global configuration for plugins "pluginsConfig": { "fontSettings": { // ... "size": 1 to 4 } }, // ... // Options for PDF generation "pdf": { // ... // Font size for the file content

最新发布的BookStack v2.0,功能类似Gitbook和看云的文档写作系统

浪尽此生 提交于 2019-12-03 10:59:52
BookStack,分享知识,共享智慧!知识,因分享,传承久远! BookStack 是基于 Mindoc、使用Go语言的Beego框架开发的功能类似GitBook和看云的在线文档管理系统,实现了文档采集、导入、电子书生成以及版本控制等强大的文档功能,并推出了配套的开源微信小程序 BookChat。 升级日志 BookStack 配套微信小程序 BookChat 接口实现,累计 20+ 个API接口 修复删除项目时误删默认封面的bug HTML内容处理,以兼容微信小程序rich-text组件对HTML内容的渲染 增加开源书籍和文档收录提交入口,以及收录管理 内容采集增强和优化 书籍在发布的时候,自动把非站内图片自动采集下来 书籍页增加小程序码,提供小程序阅读入口,打通PC端与移动端一体化阅读浏览 增加评论审核与管理功能 横幅管理 支持 epub 导入(感谢 @wenfengand的PR) 隐藏附件管理入口(因为不依赖于此管理附件) 管理后台增加根据用户名、昵称、邮箱和角色对用户进行检索和管理的功能 增加作者角色,用于控制普通用户创建项目权限,有效控制不良项目对网站资源的占用 增加微信小程序配置项(在 app.conf 文件中) 新增微信小程序配置项如下 # 微信小程序 appid appId="" # 微信小程序appSecret appSecret="" # 是否限制API请求

Gitbook : random errors when using gitbook plugin on running "gitbook serve"

北战南征 提交于 2019-12-03 04:20:50
在执行 gitbook serve 时,会有不定的失败错误 参考问题 : #1309 解决方案: 更新gitbook版本,这个问题似乎是3版本的问题 , 官方也不打算在这个版本解决了。 更新 到最新版本后, 不再出现问题了。 列出所有可用的版本 gitbook ls-remote 这里最新版本为 : pre-release 4.0.0-alpha.6 使用最新版本 gitbook fetch 4.0.0-alpha.6 来源: oschina 链接: https://my.oschina.net/u/2697791/blog/2990710

Gitbook-Ext 修改Gitbook模板

放肆的年华 提交于 2019-12-01 19:55:15
Gitbook-Ext GitBook 是一个基于 Node.js 的命令行工具,可使用 Github/Git 和 Markdown 来制作精美的电子书,GitBook 并非关于 Git 的教程。 GitBook 提供的的默认样式可能不能满足您的视觉需求,Gitbook-Ext是对GitBook的扩展,并陆续会提供一些更丰富的模板选择。 扩展功能 提供多种色彩模板选择:theme-green,theme-purple,theme-orange,theme-gray; 提供菜单可折叠配置; 提供是否生成菜单序号配置; 提供标题与版权信息设置。 电脑上的效果 手机上的效果 预览效果 http://f2edocs.com/ 快速开始 安装GitBook 首先你需要先安装nodejs/npm, 然后在安装gitbook 通过以下命令就可以安装 $ npm install gitbook-cli -g gitbook具体详细可以参考 https://github.com/GitbookIO/gitbook 安装Gitbook-Ext npm install gitbook-ext -g 查看帮助 gitbook-ext -h 会列出以下信息 Usage: index [options] Options: -h, --help output usage information -V, -

用 Github、Markdown 和 GitBook 写开源书

社会主义新天地 提交于 2019-12-01 19:55:05
原文同步至: http://www.waylau.com/using-github-markdown-gitbook-write-open-source-books/ 之前一直是在 Github 上写开源书(见: http://www.waylau.com/books/ )但,由于 Github 本身的目录结构并不一定符合阅读的习惯,而且没有提供 pdf , ePUB, MOBI 等格式的转换下载。很多同学也还是习惯离线看文档。GitBook 就是解决这一问题。 GitBook 让你在保持在 Github 的书写习惯外,稍加配置,就能自动发布到GitBook 上,形成界面漂亮的电子书了(支持 html, pdf , ePUB, MOBI 等)。 <!-- more --> 如果你是第一次使用 GitBook,可以参见 使用 GitBook 写开源书 下面介绍,如果将一个 Github 项目转移到 GitBook 上来 ##注册账户 需要拥有 Github 和 GitBook 的账户 ##关联账号 将 GitBook 的项目关联上 Github 的库 <a href="http://s1288.photobucket.com/user/waylau/media/waylau%20blog/gitbook/09_zpsaeaf67fe.jpg.html" target="_blank"