GitBook is a hosted solution for documentation websites and knowledge bases. In a nutshell, you sign in to GitBook’s website and use their web-based editor to write your documentation. Or, if you’d rather maintain control over your content, you can keep it in a git repository that is integrated with GitBook. Either way, you can create different webpages and organize them in a logical order. When everything looks the way you want it, you can publish it on a custom domain.
Like so many projects, GitBook started as an open source toolchain with a commercial offering, but eventually dropped the open source project in favor of a new proprietary and closed-source offering that’s hosted exclusively on their website. The open source toolchain is still available, but as that option is now unsupported, this article only documents the new hosted option.
The advantage of GitBook over a tool like Docusaurus is that GitBook takes care of building and hosting the site, and the WYSIWYG controls are intuitive enough to be used by Markdown novices. On the GitBook website, the live editor hides the Markdown formatting syntax after you type it. The editor is a bit flaky, but weird little bugs aside, the website generally works for both Markdown experts and people who don’t have any experience with Markdown. You can also simply copy and paste Markdown-formatted text into the GitBook interface.
GitBook provides support for the following Markdown elements.
Element | Support | Notes |
---|---|---|
标题 | 支持 | |
段落 | 支持 | |
换行符 | 支持 | |
粗体 | 支持 | |
斜体 | 支持 | |
块引用 | 支持 | |
有序列表 | 支持 | |
无序列表 | 支持 | |
代码块 | 支持 | |
水平分隔符 | 不支持 | |
链接 | 支持 | |
图片 | 支持 | |
表格 | 支持 | |
围栏代码块 | 支持 | |
语法高亮 | 支持 | |
脚注 | 不支持 | |
标题 ID | 支持 | |
定义列表 | 不支持 | |
删除线 | 支持 | |
任务列表 | 支持 | |
Emoji (复制和粘贴) | 未知 | |
Emoji (简码) | 未知 | |
强调 | 不支持 | |
下标 | 不支持 | |
上标 | 不支持 | |
Automatic URL Linking | 支持 | |
Disabling Automatic URL Linking | 支持 | |
HTML | 不支持 |
现在不要停下来!在下面输入你的电子邮件地址,以通过电子邮件接收新的 Markdown 教程。我们不会发送垃圾邮件!