文档章节

Markdown语言快速参考

openthings
 openthings
发布于 2016/04/09 10:58
字数 809
阅读 60
收藏 1

Basic writing and formatting syntax

Create sophisticated formatting for your prose and code on GitHub with simple syntax.

Headings

To create a heading, add one to six # symbols before your heading text. The number of # you use will determine the size of the heading.

# The largest heading
## The second largest heading
###### The smallest heading

Rendered H1, H2, and H6 headings

Styling text

You can indicate emphasis with bold, italic, or strikethrough text.

Style Syntax Keyboard shortcut Example Output
Bold ** ** or __ __ command/control + b **This is bold text** This is bold text
Italic * * or _ _ command/control + i *This text is italicized* This text is italicized
Strikethrough ~~ ~~
~~This was mistaken text~~ This was mistaken text
Bold and italic ** ** and _ _
**This text is _extremely_ important** This text is extremely important

Quoting text

You can quote text with a >.

In the words of Abraham Lincoln:

> Pardon my French

Rendered quoted text

Tip: When viewing an issue or pull request, you can automatically quote text in a reply by highlighting the text, then typing r. For more information, see "Using keyboard shortcuts."

Quoting code

You can call out code or a command within a sentence with single backticks. The text within the backticks will not be formatted.

Use `git status` to list all new or modified files that haven't yet been committed.

Rendered inline code block

To format code or text into its own distinct block, use triple backticks.

Some basic Git commands are:
```
git status
git add
git commit
```

Rendered code block

For more information, see "Creating and highlighting code blocks."

Links

You can create an inline link by wrapping link text in brackets [ ], and then wrapping the URL in parentheses ( ). You can also use the keyboard shortcut command + k to create a link.

This site was built using [GitHub Pages](https://pages.github.com/).

Rendered link

Tip: GitHub automatically creates links when valid URLs are written in a comment. For more information, see "Autolinked references and URLS."

Lists

You can make a list by preceding one or more lines of text with - or *.

- George Washington
- John Adams
- Thomas Jefferson

Rendered unordered list

To order your list, precede each line with a number.

1. James Madison
2. James Monroe
3. John Quincy Adams

Rendered ordered list

You can create nested lists by indenting lines by two spaces.

1. Make my changes
  1. Fix bug
  2. Improve formatting
    * Make the headings bigger
2. Push my commits to GitHub
3. Open a pull request
  * Describe my changes
  * Mention all the members of my team
    * Ask for feedback

Rendered nested list

Task lists

You can create task lists by prefacing list items with [ ]. To mark a task as complete, use [x].

Task lists render with checkboxes in all comments and Markdown files. Select or unselect the checkboxes to mark them as complete or incomplete.

- [x] Finish my changes
- [ ] Push my commits to GitHub
- [ ] Open a pull request

Rendered task list

Mentioning users and teams

You can mention a user or team on GitHub by typing @ plus their username or team name to bring their attention to an issue or pull request.

@github/support What do you think about these updates?

Rendered @mention

Typing an @ symbol will bring up a list of people or teams on a project. The list filters as you type, so once you find the name of the person or team you are looking for, you can use the arrow keys to select it and hit either tab or enter to complete the name. For teams, just enter the @organization/team-name and all members of that team will get subscribed to the issue.

The autocomplete results are restricted to repository collaborators and any other participants on the thread.

Referencing issues and pull requests

You can bring up a list of suggested Issues and Pull Requests within the repository by typing #. Type the issue or PR number or title to filter the list, then hit either tab or enter to complete the highlighted result.

For more information, see "Autolinked references and URLs."

Using emoji

You can add emoji to your writing by typing :EMOJICODE:.

@octocat :+1: This PR looks great - it's ready to merge! :shipit:

Rendered emoji

Typing : will bring up a list of suggested emoji. The list will filter as you type, so once you find the emoji you're looking for, press Tab or Enter to complete the highlighted result.

For a full list of available emoji and codes, check out emoji-cheat-sheet.com.

Paragraphs and line breaks

You can create a new paragraph by leaving a blank line between lines of text.

Ignoring Markdown formatting

You can tell GitHub to ignore (or escape) Markdown formatting by using \ before the Markdown character.

Let's rename \*our-new-project\* to \*our-old-project\*.

Rendered escaped character

For more information, see Daring Fireball's "Markdown Syntax."

Further reading


本文转载自:https://help.github.com/articles/basic-writing-and-formatting-syntax/

共有 人打赏支持
openthings
粉丝 266
博文 990
码字总数 532040
作品 1
东城
架构师
Markdown快速入门

Markdown 是一种轻量级标记语言,创始人为 John Gruber 和 Aaron Swartz。它允许人们“使用易读易写的纯文本格式编写文档,然后转换成有效的 XHTML/HTML 文档” OSC 博客已支持使用Markdown书...

tsl0922
2012/10/18
13.8K
11
Markdown: Basics (快速入门)

Markdown现在作为写blog的标记语言越来越流行,[github][github]和oschina都支持,于是也学习一下。 段落、标题、区块代码 一个段落是由一个以上的连接的行句组成,而一个以上的空行则会划分...

谦谦君子
2014/03/21
0
2
在Notepad++中使用Markdown

markdown是一种纯文本格式的标记语言。通过简单的标记语法,它可以使普通文本内容具有一定的格式。 Notepad++是一款非常好用的编辑器,下面记录一下怎么让Notepad++支持Markdown。 导入语言格...

东都大狼狗
08/02
0
0
4 种基于 Markdown 的幻灯片生成器

这些简单的幻灯片创建工具可以无缝地使用 Markdown,可以让你的演示添加魅力。 假设你需要做一个演示presentation。在准备的过程中,你想到“我需要写几张幻灯片”。 你可能倾向于简洁的纯文...

11%
06/26
0
0
JavaScript Markdown 处理器--Madoko

Madoko 是个快速的 Markdown 处理器,可以编写专业论文,书籍,手册,Web 页面和幻灯片。专注于简化和处理纯文本可读性。 使用 Madoko 可以基于 Markdown 编写复杂的文档,也可以输出漂亮的 ...

叶秀兰
2015/12/29
1K
0

没有更多内容

加载失败,请刷新页面

加载更多

原型模式

1、原型模式-定义 用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象 克隆(浅度克隆->拷贝值类型或者引用,深度克隆->创建新的对象,开辟新的内存) 例如客户端知道抽象Pro...

阿元
今天
32
0
awk命令扩展使用操作

awk 中使用外部shell变量 示例1 [root@centos01 t1022]# A=888[root@centos01 t1022]# echo "" | awk -v GET_A=$A '{print GET_A}'888[root@centos01 t1022]# echo "aaaaaaaaaaaaa" | aw......

野雪球
今天
28
0
深入解析MySQL视图VIEW

Q:什么是视图?视图是干什么用的? A:视图(view)是一种虚拟存在的表,是一个逻辑表,本身并不包含数据。作为一个select语句保存在数据字典中的。   通过视图,可以展现基表的部分数据;...

IT--小哥
今天
37
0
虚拟机学习之二:垃圾收集器和内存分配策略

1.对象是否可回收 1.1引用计数算法 引用计数算法:给对象中添加一个引用计数器,每当有一个地方引用它时,计数器值就加1;当引用失效时,计数器值就减1;任何时候计数器值为0的对象就是不可能...

贾峰uk
今天
24
0
smart-doc功能使用介绍

smart-doc从8月份底开始开源发布到目前为止已经迭代了几个版本。在这里非常感谢那些敢于用smart-doc去做尝试并积极提出建议的社区用户。因此决定在本博客中重要说明下smart-doc的功能,包括使...

上官胡闹
昨天
37
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部