Gitbook

Anh-Thi Dinh

URLs

  • Emoji Copy (You cannot use :blush: in the markdown file, you need to copy icon itself).

Setting up

File book.json needs to be placed in the root of your gitbook repository on Github. Below are some settings that I have used.
1{
2	"plugins": [
3		"mathjax"
4	],
5	"pluginsConfig": {
6		"mathjax":{
7				"forceSVG": true
8		}
9	}
10}

Math in Gitbook

You have to use $$a+b$$ instead of $a+b$ for inline math. Others are the same as normal expressions in Markdown.

Blocks

Boxes

Info blocks,
1{% hint style="info" %}
2	Hint blocks.
3	<br />Line break.
4{% endhint %}
Danger blocks,
1{% hint style="danger" %}
2	Content.
3{% endhint %}
Success blocks,
1{% hint style="success" %}
2	Content.
3{% endhint %}
Warning blocks,
1{% hint style="warning" %}
2	Content.
3{% endhint %}

Code blocks

1{% code-tabs %}
2{% code-tabs-item title="book.json" %}
3```bash
4cd directory/
5```
6{% endcode-tabs-item %}
7{% endcode-tabs %}

Box with tabs

1{% tabs %}
2{% tab title="First Tab" %}
3Content of tab 1.
4{% endtab %}
5
6{% tab title="Second Tab" %}
7Content of tab 2.
8{% endtab %}
9{% endtabs %}

Tasks

1* [x] Task 1
2* [ ] Task 2
3* [ ] Task 3