跳到主要内容

Markdown 语法手册

Tabs#

This is an apple 🍎
function helloWorld() {  console.log('Hello, world!');}

General Markdown Features#

Content

Blockquote

Syntax Highlighting#

/src/components/HelloCodeTitle.js
function HelloCodeTitle(props) {  return <h1>Hello, {props.name}</h1>;}
console.log('Every repo must come with a mascot.');
function HighlightSomeText(highlight) {  if (highlight) {    return 'This text is highlighted!';  }
  return 'Nothing highlighted';}
import React from 'react';
function MyComponent(props) {  if (props.isBar) {    return <div>Bar</div>;  }
  return <div>Foo</div>;}
export default MyComponent;

Admonitions#

note

The content and title can include markdown.

You can specify an optional title

Heads up! Here's a pro-tip.

info

Useful information.

caution

Warning! You better pay attention!

danger

Danger danger, mayday!

Badges#

Default Badge
<span className="badge">Default Badge</span>
badge--primary
<span className="badge badge--primary">badge--primary</span>
badge--secondary
<span className="badge badge--secondary">badge--secondary</span>
badge--success
<span className="badge badge--success">badge--success</span>
badge--info
<span className="badge badge--info">badge--info</span>
badge--warning
<span className="badge badge--warning">badge--warning</span>
badge--danger
<span className="badge badge--danger">badge--danger</span>