文档章节

Markdown语言快速参考

openthings
 openthings
发布于 2016/04/09 10:58
字数 809
阅读 62
收藏 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
粉丝 277
博文 1024
码字总数 556021
作品 1
东城
架构师
私信 提问
Markdown快速入门

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

tsl0922
2012/10/18
14.3K
11
在Notepad++中使用Markdown

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

东都大狼狗
08/02
0
0
Markdown: Basics (快速入门)

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

谦谦君子
2014/03/21
0
2
华为公有云ECS Javascript SDK开发项目

需求 1. 实现华为公有云ECS Javascript SDK开发,开发语言为Javascript。 2. 报名者需要提供简单方案描述文档,无方案文档的我们一律不予审核,我们会根据文档初步评估报名者。 3. 代码需要跨...

华为众包
2016/09/27
6
3
4 种基于 Markdown 的幻灯片生成器

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

11%
06/26
0
0

没有更多内容

加载失败,请刷新页面

加载更多

微服务分布式事务实现

https://www.processon.com/view/link/5b2144d7e4b001a14d3d2d30

WALK_MAN
今天
2
0
《大漠烟尘》读书笔记及读后感文章3700字

《大漠烟尘》读书笔记及读后感文章3700字: 在这个浮躁的社会里,你有多久没有好好读完一本书了? 我们总觉得自己和别人不一样,所以当看到别人身上的问题时,很少有“反求诸己”,反思自己。...

原创小博客
今天
4
0
大数据教程(9.5)用MR实现sql中的jion逻辑

上一篇博客讲解了使用jar -jar的方式来运行提交MR程序,以及通过修改YarnRunner的源码来实现MR的windows开发环境提交到集群的方式。本篇博主将分享sql中常见的join操作。 一、需求 订单数据表...

em_aaron
今天
3
0
十万个为什么之什么是resultful规范

起源 越来越多的人开始意识到,网站即软件,而且是一种新型的软件。这种"互联网软件"采用客户端/服务器模式,建立在分布式体系上,通过互联网通信,具有高延时(high latency)、高并发等特点...

尾生
今天
3
0
Terraform配置文件(Terraform configuration)

Terraform配置文件 翻译自Terraform Configuration Terraform用文本文件来描述设备、设置变量。这些文件被称为Terraform配置文件,以.tf结尾。这一部分将讲述Terraform配置文件的加载与格式。...

buddie
今天
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部