Skip to content

Latest commit

 

History

History
122 lines (64 loc) · 4.26 KB

File metadata and controls

122 lines (64 loc) · 4.26 KB

1.3 GitBook

起草人:康温佼 崔玉贵 审阅人:崔玉贵

  1. 什么是GitBook

    GitBook is both an online platform for writing and hosting documentation, and an open source book format and toolchain.

    Hundreds of thousands of users use GitBook to write documentation (library, API, tools, etc.), or knowledge bases (like this F.A.Q.). People also use GitBook to publish technical books, teaching material, and many other things.

  2. GitBook注册

    在网页中输入www.gitbook.com,选择注册,输入自己的邮箱以及用户名

  3. 如何创建一本书

    创建一个新的仓库 创建一个新文件,名为SUMMARY.md,里面填入:

    # Summary
    * [前言](README.md)
  4. 如何使用GitBook编辑器

    1. 在Mac上安装它:

      Download gitbook-mac.dmg Open the file Copy the Codebox application to your mac's Applications folder Open it and start working

    2. 在Linux上安装它:

      Download gitbook-linux32.tar.gz Extract it using: tar -xvzf gitbook-linux32.tar.gz Run the installation script cd GitBook && ./install.sh There is now a shortcut on your desktop Open it and start working

    3. 在 Windows 上安装它:

      Download gitbook-win.zip Extract it using a ZIP tool Copy the GitBook folder to your desktop Open GitBook.exe and start working

  5. 以不同形式阅读一本书(网页,PDF等)

  6. 什么是Markdown

    Markdown是一种可以使用普通文本编辑器编写的标记语言,通过类似HTML的标记语法,它可以使普通文本内容具有一定的格式。

    Markdown具有一系列衍生版本,用于扩展Markdown的功能(如表格、脚注、内嵌HTML等等),这些功能原初的Markdown尚不具备,它们能让Markdown转换成更多的格式

  7. Markdown基础语法

    1. 标题设置(让字体变大,和word的标题意思一样)

      在Markdown当中设置标题,有两种方式:

      第一种:通过在文字下方添加“=”和“-”,他们分别表示一级标题和二级标题。

      第二种:在文字开头加上 “#”,通过“#”数量表示几级标题。(一共只有1~6级标题,1级标题字体最大)

    2. 块注释(blockquote)

      通过在文字开头添加>表示块注释。(当>和文字之间添加五个blank时,块注释的文字会有变化。)

    3. 斜体

      将需要设置为斜体的文字两端使用1个“*”或者“_”夹起来

    4. 粗体

      将需要设置为斜体的文字两端使用2个“*”或者“_”夹起来

    5. 无序列表

      在文字开头添加(*, +, and -)实现无序列表。但是要注意在(*, +, and -)和文字之间需要添加空格。(建议:一个文档中只是用一种无序列表的表示方式)

    6. 有序列表

      使用数字后面跟上句号。(还要有空格)

    7. 链接(Links)

      Markdown中有两种方式,实现链接,分别为内联方式和引用方式。

      内联方式:This is an [example link](http://example.com/).

      引用方式:

      I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3].

      [1]: http://google.com/ "Google"

      [2]: http://search.yahoo.com/ "Yahoo Search"

      [3]: http://search.msn.com/ "MSN Search"

    8. 图片(Images)

      图片的处理方式和链接的处理方式,非常的类似。

      内联方式:![alt text](/path/to/img.jpg "Title")

      引用方式:

      ![alt text][id]

      [id]: /path/to/img.jpg "Title"

    9. 代码(HTML中所谓的Code)

      实现方式有两种:

      第一种:简单文字出现一个代码框。使用`<blockquote>`。(`不是单引号而是左上角的ESC下面~中的`)

      第二种:大片文字需要实现代码框。使用Tab和四个空格。

    10. 脚注(footnote)

      实现方式如下:

      hello[^hello]

      [^hello]: hi

    11. 下划线 在空白行下方添加三条“-”横线。(前面讲过在文字下方添加“-”,实现的2级标题)